fix #1923 by avoiding extra build step (#1924)

This commit is contained in:
Andrew Stanton-Nurse 2018-04-10 16:26:37 -07:00 committed by GitHub
parent 5fa2892561
commit 3136e5b05f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 6 deletions

View File

@ -33,6 +33,7 @@
<Target Name="RunBrowserTests">
<Message Text="Running TypeScript client Browser tests" Importance="high" />
<Exec Command="npm run build" WorkingDirectory="$(RepositoryRoot)clients/ts/FunctionalTests" IgnoreStandardErrorWarningFormat="true" />
<Exec Command="npm run ci-test -- --configuration $(Configuration)" WorkingDirectory="$(RepositoryRoot)clients/ts/FunctionalTests" IgnoreStandardErrorWarningFormat="true" />
</Target>

View File

@ -21,7 +21,8 @@
"build:tsc": "node ../node_modules/typescript/bin/tsc --project ./tsconfig.json",
"build:rollup": "node ../node_modules/rollup/bin/rollup -c",
"pretest": "npm run build",
"test": "dotnet build && ts-node --project ./selenium/tsconfig.json ./selenium/run-tests.ts",
"test": "dotnet build && npm run test-only",
"test-only": "ts-node --project ./selenium/tsconfig.json ./selenium/run-tests.ts",
"ci-test": "ts-node --project ./selenium/tsconfig.json ./selenium/run-ci-tests.ts"
},
"author": "",

View File

@ -74,15 +74,15 @@ if (!existsSync(chromeBinary)) {
console.log(`Using Google Chrome Browser from '${chromeBinary}`);
}
// Launch the tests
const args = ["test", "--", "--raw", "--chrome", chromeBinary];
// Launch the tests (we know the CI already built, so run the 'test-only' script)
const args = ["run", "test-only", "--", "--raw", "--chrome", chromeBinary];
if (configuration) {
args.push("--configuration");
args.push(configuration);
}
if (verbose) {
args.push("--verbose");
}
let command = "npm";
@ -102,4 +102,4 @@ console.log(`running: ${command} ${args.join(" ")}`);
const testProcess = spawn(command, args, { cwd: path.resolve(__dirname, "..") });
testProcess.stderr.pipe(process.stderr);
testProcess.stdout.pipe(process.stdout);
testProcess.on("close", (code) => process.exit(code));
testProcess.on("close", (code) => process.exit(code));