Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

Commit d7ade23

Browse files
chalinkwalrath
authored andcommitted
chore(dart e2e): add --[no-]pub flag (#2171)
This flag (on by default) determines if `pub {upgrade,build}` is run before launching e2e tests. It is useful to be able to disable when tweaking the e2e tests themselves.
1 parent 10568ca commit d7ade23

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

gulpfile.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -344,10 +344,14 @@ function runE2eDartTests(appDir, outputFile) {
344344
gutil.log('http-server failed to launch over ' + deployDir);
345345
return false;
346346
}
347-
var pubUpgradeSpawnInfo = spawnExt('pub', ['upgrade'], { cwd: appDir });
348-
var prepPromise = pubUpgradeSpawnInfo.promise.then(function (data) {
349-
return spawnExt('pub', ['build'], { cwd: appDir }).promise;
350-
});
347+
if (argv.pub === false) {
348+
var prepPromise = Promise.resolve(true);
349+
} else {
350+
var pubUpgradeSpawnInfo = spawnExt('pub', ['upgrade'], { cwd: appDir });
351+
var prepPromise = pubUpgradeSpawnInfo.promise.then(function (data) {
352+
return spawnExt('pub', ['build'], { cwd: appDir }).promise;
353+
});
354+
}
351355
return runProtractor(prepPromise, appDir, appRunSpawnInfo, outputFile);
352356
}
353357

0 commit comments

Comments
 (0)