From 2feb7c21c789e3fb551642505b44e1a5bd6f7f9b Mon Sep 17 00:00:00 2001 From: Yuxuan Zhou Date: Thu, 4 May 2017 13:18:59 -0700 Subject: [PATCH] Fix unit test serve mode (#9148) --- build-system/app.js | 23 ----------------------- build-system/tasks/runtime-test.js | 4 ++-- 2 files changed, 2 insertions(+), 25 deletions(-) diff --git a/build-system/app.js b/build-system/app.js index b16f9f2df2be..6d189223955d 100644 --- a/build-system/app.js +++ b/build-system/app.js @@ -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; } diff --git a/build-system/tasks/runtime-test.js b/build-system/tasks/runtime-test.js index 66eda249ee86..a0ae7291daab 100644 --- a/build-system/tasks/runtime-test.js +++ b/build-system/tasks/runtime-test.js @@ -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) {