Skip to content

Commit

Permalink
Fix unit test serve mode (#9148)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouyx authored May 4, 2017
1 parent f8f8f5b commit 2feb7c2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 25 deletions.
23 changes: 0 additions & 23 deletions build-system/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -969,29 +969,6 @@ function addViewerIntegrationScript(ampJsVersion, file) {
return file;
}

/**
* @param {string} path
* @return {string}
*/
function extractFilePathSuffix(path) {
return path.substr(-9);
}

/**
* @param {string} path
* @return {?string}
*/
function getPathMode(path) {
var suffix = extractFilePathSuffix(path);
if (suffix == '.max.html') {
return 'default';
} else if (suffix == '.min.html') {
return 'compiled';
} else {
return null;
}
}

function getUrlPrefix(req) {
return req.protocol + '://' + req.headers.host;
}
Expand Down
4 changes: 2 additions & 2 deletions build-system/tasks/runtime-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,9 @@ gulp.task('test', 'Runs tests', argv.nobuild ? [] : ['build'], function(done) {
};

if (argv.compiled) {
process.env.SERVE_MODE = 'min';
process.env.SERVE_MODE = 'compiled';
} else {
process.env.SERVE_MODE = 'max';
process.env.SERVE_MODE = 'default';
}

if (argv.grep) {
Expand Down

0 comments on commit 2feb7c2

Please sign in to comment.