Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(deps-dev): update mocha requirement from ^5.2.0 to ^6.1.2 #1490

Merged
merged 5 commits into from
Apr 10, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
"name": "Stryker unit tests",
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
"args": [
"-u",
"tdd",
"--timeout",
"999999",
"--colors",
Expand All @@ -26,8 +24,6 @@
"name": "Stryker-mocha-framework unit tests",
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
"args": [
"-u",
"tdd",
"--timeout",
"999999",
"--colors",
Expand All @@ -42,8 +38,6 @@
"name": "babel-transpiler unit tests",
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
"args": [
"-u",
"tdd",
"--timeout",
"999999",
"--colors",
Expand All @@ -58,8 +52,6 @@
"name": "javascript-mutator unit tests",
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
"args": [
"-u",
"tdd",
"--timeout",
"999999",
"--colors",
Expand Down
14 changes: 12 additions & 2 deletions helpers/bootstrap-local-dependencies.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ListByPackage, LocalInstaller, progress } from 'install-local';
import { fs } from 'mz';
import * as fs from 'fs';
import glob = require('glob');
import path = require('path');

Expand All @@ -17,6 +17,16 @@ function globAsPromised(pattern: string, options: glob.IOptions) {
});
}

function readFile(fileName: string) {
return new Promise<string>((res, rej) => fs.readFile(fileName, 'utf8', (err, content) => {
if (err) {
rej(err);
} else {
res(content);
}
}));
}

interface Package {
localDependencies?: { [name: string]: string };
}
Expand All @@ -29,7 +39,7 @@ interface Package {
export async function bootstrapLocalDependencies(directory: string) {
console.log('bootstrap ' + path.resolve(directory));
const files = await globAsPromised('{package.json,test/*/package.json}', { cwd: path.resolve(directory) });
const packages = await Promise.all(files.map(fileName => fs.readFile(fileName, 'utf8')
const packages = await Promise.all(files.map(fileName => readFile(fileName)
.then(content => ({ dir: path.dirname(fileName), content: JSON.parse(content) as Package }))));
const sourcesByTarget: ListByPackage = {};
for (const pkg of packages) {
Expand Down
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,15 @@
"jasmine-core": "^3.1.0",
"lerna": "^3.10.7",
"link-parent-bin": "~1.0.0",
"mocha": "^5.2.0",
"mocha": "^6.1.2",
"nyc": "^13.0.1",
"rimraf": "^2.6.1",
"rxjs": "^6.4.0",
"sinon": "^7.2.0",
"sinon-chai": "^3.2.0",
"source-map-support": "^0.5.6",
"tslint": "~5.15.0",
"typescript": "^3.3.1",
"web-component-tester": "6.9.2"
"typescript": "^3.3.1"
},
"prettier": {
"singleQuote": true
Expand Down
4 changes: 0 additions & 4 deletions packages/api/.vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
"name": "Integration tests",
"program": "${workspaceFolder}/../../node_modules/mocha/bin/_mocha",
"args": [
"-u",
"tdd",
"--timeout",
"999999",
"--colors",
Expand All @@ -27,8 +25,6 @@
"name": "Unit tests",
"program": "${workspaceRoot}/../../node_modules/mocha/bin/_mocha",
"args": [
"-u",
"tdd",
"--timeout",
"999999",
"--colors",
Expand Down
4 changes: 0 additions & 4 deletions packages/babel-transpiler/.vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
"name": "Unit tests",
"program": "${workspaceRoot}/../../node_modules/mocha/bin/_mocha",
"args": [
"-u",
"tdd",
"--timeout",
"999999",
"--colors",
Expand All @@ -26,8 +24,6 @@
"name": "Integration tests",
"program": "${workspaceRoot}/../../node_modules/mocha/bin/_mocha",
"args": [
"-u",
"tdd",
"--timeout",
"999999",
"--colors",
Expand Down
4 changes: 0 additions & 4 deletions packages/core/.vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
"name": "Unit tests",
"program": "${workspaceRoot}/../../node_modules/mocha/bin/_mocha",
"args": [
"-u",
"tdd",
"--timeout",
"999999",
"--colors",
Expand Down Expand Up @@ -55,8 +53,6 @@
"name": "Integration tests",
"program": "${workspaceRoot}/../../node_modules/mocha/bin/_mocha",
"args": [
"-u",
"tdd",
"--timeout",
"999999",
"--colors",
Expand Down
4 changes: 0 additions & 4 deletions packages/html-reporter/.vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
"name": "Run unit tests",
"program": "${workspaceRoot}/../../node_modules/mocha/bin/_mocha",
"args": [
"-u",
"tdd",
"--timeout",
"999999",
"--colors",
Expand All @@ -43,8 +41,6 @@
"name": "Run integration tests",
"program": "${workspaceRoot}/../../node_modules/mocha/bin/_mocha",
"args": [
"-u",
"tdd",
"--timeout",
"999999",
"--colors",
Expand Down
4 changes: 0 additions & 4 deletions packages/jasmine-framework/.vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
"name": "Unit tests",
"program": "${workspaceFolder}/../../node_modules/mocha/bin/_mocha",
"args": [
"-u",
"tdd",
"--timeout",
"999999",
"--colors",
Expand All @@ -30,8 +28,6 @@
"name": "Integration tests",
"program": "${workspaceFolder}/../../node_modules/mocha/bin/_mocha",
"args": [
"-u",
"tdd",
"--timeout",
"999999",
"--colors",
Expand Down
4 changes: 0 additions & 4 deletions packages/jasmine-runner/.vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
"name": "Unit tests",
"program": "${workspaceFolder}/../../node_modules/mocha/bin/_mocha",
"args": [
"-u",
"tdd",
"--timeout",
"999999",
"--colors",
Expand All @@ -30,8 +28,6 @@
"name": "Integration tests",
"program": "${workspaceFolder}/../../node_modules/mocha/bin/_mocha",
"args": [
"-u",
"tdd",
"--timeout",
"999999",
"--colors",
Expand Down
4 changes: 0 additions & 4 deletions packages/javascript-mutator/.vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
"name": "Unit tests",
"program": "${workspaceRoot}/../../node_modules/mocha/bin/_mocha",
"args": [
"-u",
"tdd",
"--timeout",
"999999",
"--colors",
Expand All @@ -26,8 +24,6 @@
"name": "Integration tests",
"program": "${workspaceRoot}/../../node_modules/mocha/bin/_mocha",
"args": [
"-u",
"tdd",
"--timeout",
"999999",
"--colors",
Expand Down
4 changes: 0 additions & 4 deletions packages/jest-runner/.vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
"name": "Unit tests",
"program": "${workspaceFolder}/../../node_modules/mocha/bin/_mocha",
"args": [
"-u",
"tdd",
"--timeout",
"999999",
"--colors",
Expand All @@ -30,8 +28,6 @@
"name": "Integration tests",
"program": "${workspaceFolder}/../../node_modules/mocha/bin/_mocha",
"args": [
"-u",
"tdd",
"--timeout",
"999999",
"--colors",
Expand Down
4 changes: 0 additions & 4 deletions packages/karma-runner/.vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
"name": "Unit tests",
"program": "${workspaceRoot}/../../node_modules/mocha/bin/_mocha",
"args": [
"-u",
"tdd",
"--timeout",
"999999",
"--colors",
Expand All @@ -38,8 +36,6 @@
"name": "Integration tests",
"program": "${workspaceRoot}/../../node_modules/mocha/bin/_mocha",
"args": [
"-u",
"tdd",
"--timeout",
"999999",
"--colors",
Expand Down
4 changes: 0 additions & 4 deletions packages/mocha-runner/.vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
"name": "Unit tests",
"program": "${workspaceFolder}/../../node_modules/mocha/bin/_mocha",
"args": [
"-u",
"tdd",
"--timeout",
"999999",
"--colors",
Expand All @@ -30,8 +28,6 @@
"name": "Integration tests",
"program": "${workspaceFolder}/../../node_modules/mocha/bin/_mocha",
"args": [
"-u",
"tdd",
"--timeout",
"999999",
"--colors",
Expand Down
4 changes: 0 additions & 4 deletions packages/typescript/.vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
"name": "Unit tests",
"program": "${workspaceRoot}/../../node_modules/mocha/bin/_mocha",
"args": [
"-u",
"tdd",
"--timeout",
"999999",
"--colors",
Expand All @@ -26,8 +24,6 @@
"name": "Integration tests",
"program": "${workspaceRoot}/../../node_modules/mocha/bin/_mocha",
"args": [
"-u",
"tdd",
"--timeout",
"999999",
"--colors",
Expand Down
4 changes: 0 additions & 4 deletions packages/util/.vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
"name": "Unit tests",
"program": "${workspaceFolder}/../../node_modules/mocha/bin/_mocha",
"args": [
"-u",
"tdd",
"--timeout",
"999999",
"--colors",
Expand All @@ -30,8 +28,6 @@
"name": "Integration tests",
"program": "${workspaceFolder}/../../node_modules/mocha/bin/_mocha",
"args": [
"-u",
"tdd",
"--timeout",
"999999",
"--colors",
Expand Down
4 changes: 0 additions & 4 deletions packages/vue-mutator/.vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
"name": "Unit tests",
"program": "${workspaceRoot}/../../node_modules/mocha/bin/_mocha",
"args": [
"-u",
"tdd",
"--timeout",
"999999",
"--colors",
Expand All @@ -26,8 +24,6 @@
"name": "Integration tests",
"program": "${workspaceRoot}/../../node_modules/mocha/bin/_mocha",
"args": [
"-u",
"tdd",
"--timeout",
"999999",
"--colors",
Expand Down
4 changes: 0 additions & 4 deletions packages/wct-runner/.vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
"name": "Integration test",
"program": "${workspaceFolder}/../../node_modules/mocha/bin/_mocha",
"args": [
"-u",
"tdd",
"--timeout",
"999999",
"--colors",
Expand All @@ -31,8 +29,6 @@
"name": "Unit test",
"program": "${workspaceFolder}/../../node_modules/mocha/bin/_mocha",
"args": [
"-u",
"tdd",
"--timeout",
"999999",
"--colors",
Expand Down
6 changes: 5 additions & 1 deletion packages/wct-runner/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@
},
"devDependencies": {
"@stryker-mutator/test-helpers": "^1.2.0",
"@types/socket.io": "^2.1.0"
"@types/socket.io": "^2.1.0",
"chai": "~4.2.0",
"mocha": "~5.2.0",
"sinon": "^7.3.1",
"web-component-tester": "~6.9.2"
},
"peerDependencies": {
"@stryker-mutator/core": "^1.0.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/wct-runner/test/integration/WctTestRunner.it.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ describe('WctTestRunner integration', () => {
// The "root" wct configuration option is always loaded from the current directory.
// In order to test it properly, we need to grab it before- and reset it after each test.
let cwd: string;
const root = path.resolve(__dirname, '..', '..', '..', '..');
const root = path.resolve(__dirname, '..', '..');

function createSut(): WctTestRunner {
return testInjector.injector.injectClass(WctTestRunner);
Expand All @@ -27,7 +27,7 @@ describe('WctTestRunner integration', () => {
tests: [
{ name: '<awesome-element> is awesome', status: TestStatus.Success, failureMessages: undefined },
{ name: '<failing-element> is failing', status: TestStatus.Failed, failureMessages: ['expected true to be false'] },
{ name: '<failing-element> is throwing', status: TestStatus.Failed, failureMessages: ['This element is failing HTMLElement.throw at /components/stryker-parent/packages/wct-runner/testResources/htmlTestSuite/src/failing-element.js:11'] }
{ name: '<failing-element> is throwing', status: TestStatus.Failed, failureMessages: ['This element is failing HTMLElement.throw at /components/@stryker-mutator/wct-runner/testResources/htmlTestSuite/src/failing-element.js:11'] }
]
};
// To enable console logging: LoggerFactory.setLogImplementation(consoleLoggerFactory);
Expand Down Expand Up @@ -104,7 +104,7 @@ describe('WctTestRunner integration', () => {
const sut = createSut();
const expectedResult: TimelessRunResult = {
status: RunStatus.Complete, // We want to actually expect an error here, but wct doesn't let is.
tests: [{ name: '', status: TestStatus.Failed, failureMessages: ['Random error <unknown> at /components/stryker-parent/packages/wct-runner/testResources/garbage/test/gargbage-tests.js:1'] }]
tests: [{ name: '', status: TestStatus.Failed, failureMessages: ['Random error <unknown> at /components/@stryker-mutator/wct-runner/testResources/garbage/test/gargbage-tests.js:1'] }]
};

// Act
Expand Down
4 changes: 2 additions & 2 deletions packages/wct-runner/testResources/garbage/wct.conf.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"verbose": true,
"suites": ["packages/wct-runner/testResources/garbage/test"],
"suites": ["testResources/garbage/test"],
"plugins": {
"local": {
"browsers": ["chrome"],
Expand All @@ -12,5 +12,5 @@
}
},
"npm": true,
"root": "../../../../.."
"root": "../../.."
}
Loading