Skip to content

Commit

Permalink
test(wct): keep mocha version on 5 for wct runner
Browse files Browse the repository at this point in the history
  • Loading branch information
nicojs committed Apr 10, 2019
1 parent 9d3ff73 commit fd9d949
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 12 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@
"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
5 changes: 4 additions & 1 deletion packages/wct-runner/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@
},
"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",
"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": "../../.."
}
4 changes: 2 additions & 2 deletions packages/wct-runner/testResources/htmlTestSuite/wct.conf.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"verbose": true,
"suites": [
"packages/wct-runner/testResources/htmlTestSuite/test"
"testResources/htmlTestSuite/test"
],
"plugins": {
"local": {
Expand All @@ -16,5 +16,5 @@
}
},
"npm": true,
"root": "../../../.."
"root": "../.."
}
4 changes: 2 additions & 2 deletions packages/wct-runner/testResources/jsTestSuite/wct.conf.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"verbose": true,
"suites": ["packages/wct-runner/testResources/jsTestSuite/test"],
"suites": ["testResources/jsTestSuite/test"],
"plugins": {
"local": {
"browsers": ["chrome"],
Expand All @@ -12,5 +12,5 @@
}
},
"npm": true,
"root": "../../../../.."
"root": "../../.."
}

0 comments on commit fd9d949

Please sign in to comment.