Merge pull request #2493 from leomoty/forbid-only

Forbid only in mocha
This commit is contained in:
Daniel Imms
2019-10-22 07:15:17 -07:00
committed by GitHub
2 changed files with 17 additions and 10 deletions
+5 -5
View File
@@ -20,7 +20,7 @@ jobs:
yarn
displayName: 'Install dependencies and build'
- script: |
yarn test-unit
yarn test-unit --forbid-only
displayName: 'Unit tests'
- script: |
yarn lint
@@ -38,7 +38,7 @@ jobs:
yarn
displayName: 'Install dependencies and build'
- script: |
yarn test-unit
yarn test-unit --forbid-only
displayName: 'Unit tests'
- script: |
yarn lint
@@ -56,7 +56,7 @@ jobs:
yarn
displayName: 'Install dependencies and build'
- script: |
yarn test-unit
yarn test-unit --forbid-only
displayName: 'Unit tests'
- script: |
yarn lint
@@ -80,7 +80,7 @@ jobs:
- script: |
yarn start &
sleep 10
yarn test-api --headless
yarn test-api --headless --forbid-only
displayName: 'Linux Integration tests'
- job: macOS_IntegrationTests
@@ -97,7 +97,7 @@ jobs:
- script: |
yarn start &
sleep 10
yarn test-api --headless
yarn test-api --headless --forbid-only
displayName: 'MacOS Integration tests'
- job: Release
+12 -5
View File
@@ -15,15 +15,22 @@ let testFiles = [
'./out/**/*test.js'
];
// ability to inject particular test files via
// yarn test [testFileA testFileB ...]
let flagArgs = [];
if (process.argv.length > 2) {
testFiles = process.argv.slice(2);
const args = process.argv.slice(2);
flagArgs = args.filter(e => e.startsWith('--'));
// ability to inject particular test files via
// yarn test [testFileA testFileB ...]
files = args.filter(e => !e.startsWith('--'));
if (files.length) {
testFiles = files;
}
}
const run = cp.spawnSync(
path.resolve(__dirname, '../node_modules/.bin/mocha'),
testFiles,
[...testFiles, ...flagArgs],
{
cwd: path.resolve(__dirname, '..'),
env,
@@ -31,4 +38,4 @@ const run = cp.spawnSync(
}
);
process.exit(run.status);
process.exit(run.status);