Skip to content

Commit 63bd896

Browse files
Jest 29, upgrade core-js (#372)
1 parent a7a52bc commit 63bd896

9 files changed

Lines changed: 986 additions & 1535 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## 3.2.0
4+
5+
- Use jest 29
6+
- Use newer AST generator
7+
- Update core-js
8+
39
## 3.1.1
410

511
- Clean `src/jest/setup.ts`

package.json

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@exercism/javascript-test-runner",
33
"description": "Automated Test runner for exercism solutions in Javascript.",
44
"author": "Derk-Jan Karrenbeld <derk-jan+github@karrenbeld.info>",
5-
"version": "3.1.1",
5+
"version": "3.2.0",
66
"license": "AGPL-3.0-or-later",
77
"repository": {
88
"type": "git",
@@ -29,32 +29,32 @@
2929
"test:bare": "jest --roots test --testPathIgnorePatterns=\"fixtures/\""
3030
},
3131
"dependencies": {
32-
"@babel/core": "^7.17.2",
33-
"@babel/node": "^7.16.8",
34-
"@babel/preset-env": "^7.16.11",
35-
"@babel/preset-typescript": "^7.16.7",
36-
"@exercism/babel-preset-javascript": "^0.1.2",
32+
"@babel/core": "^7.19.3",
33+
"@babel/node": "^7.19.1",
34+
"@babel/preset-env": "^7.19.3",
35+
"@babel/preset-typescript": "^7.18.6",
36+
"@exercism/babel-preset-javascript": "^0.2.0",
3737
"@exercism/static-analysis": "^0.12.0",
38-
"@typescript-eslint/typescript-estree": "^5.11.0",
39-
"@typescript-eslint/visitor-keys": "^5.11.0",
40-
"babel-jest": "^29.0.1",
41-
"chalk": "^5.0.0",
42-
"jest": "^27.5.1"
38+
"@typescript-eslint/typescript-estree": "^5.38.1",
39+
"@typescript-eslint/visitor-keys": "^5.38.1",
40+
"babel-jest": "^29.1.2",
41+
"chalk": "^5.0.1",
42+
"jest": "^29.1.2"
4343
},
4444
"devDependencies": {
4545
"@exercism/eslint-config-tooling": "^0.4.0",
46-
"@tsconfig/node16": "^1.0.2",
47-
"@types/jest": "^27.4.0",
48-
"@types/node": "^18.0.0",
49-
"@typescript-eslint/eslint-plugin": "^5.11.0",
50-
"@typescript-eslint/parser": "^5.11.0",
51-
"eslint": "^8.9.0",
52-
"eslint-config-prettier": "^8.3.0",
53-
"eslint-plugin-import": "^2.25.4",
54-
"eslint-plugin-jest": "^27.0.1",
55-
"prettier": "^2.5.1",
46+
"@tsconfig/node16": "^1.0.3",
47+
"@types/jest": "^29.1.1",
48+
"@types/node": "^18.7.23",
49+
"@typescript-eslint/eslint-plugin": "^5.38.1",
50+
"@typescript-eslint/parser": "^5.38.1",
51+
"eslint": "^8.24.0",
52+
"eslint-config-prettier": "^8.5.0",
53+
"eslint-plugin-import": "^2.26.0",
54+
"eslint-plugin-jest": "^27.0.4",
55+
"prettier": "^2.7.1",
5656
"rimraf": "^3.0.2",
57-
"ts-jest": "^27.1.3",
58-
"typescript": "^4.5.5"
57+
"ts-jest": "^29.0.3",
58+
"typescript": "^4.8.4"
5959
}
6060
}

src/reporter.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
import { ParsedSource } from '@exercism/static-analysis'
21
import type {
3-
Context,
2+
TestContext,
43
Reporter,
54
ReporterOnStartOptions,
65
Test,
@@ -67,7 +66,7 @@ export default class StandardReporter implements Reporter {
6766
* @param aggregatedResults
6867
*/
6968
public onRunComplete(
70-
_contexts: Set<Context>,
69+
_contexts: Set<TestContext>,
7170
aggregatedResults: AggregatedResult
7271
): Promise<void> | void {
7372
this.output.finish(aggregatedResults)

test/fixtures/pythagorean-triplet/exemplar/pythagorean-triplet.spec.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,26 +11,26 @@ describe('Triplet', () => {
1111
expect(tripletsWithSum(12)).toEqual([[3, 4, 5]]);
1212
});
1313

14-
xtest('triplets whose sum is 108', () => {
14+
test('triplets whose sum is 108', () => {
1515
expect(tripletsWithSum(108)).toEqual([[27, 36, 45]]);
1616
});
1717

18-
xtest('triplets whose sum is 1000', () => {
18+
test('triplets whose sum is 1000', () => {
1919
expect(tripletsWithSum(1000)).toEqual([[200, 375, 425]]);
2020
});
2121

22-
xtest('no matching triplets for 1001', () => {
22+
test('no matching triplets for 1001', () => {
2323
expect(tripletsWithSum(1001)).toEqual([]);
2424
});
2525

26-
xtest('returns all matching triplets', () => {
26+
test('returns all matching triplets', () => {
2727
expect(tripletsWithSum(90)).toEqual([
2828
[9, 40, 41],
2929
[15, 36, 39],
3030
]);
3131
});
3232

33-
xtest('several matching triplets', () => {
33+
test('several matching triplets', () => {
3434
expect(tripletsWithSum(840)).toEqual([
3535
[40, 399, 401],
3636
[56, 390, 394],
@@ -43,15 +43,15 @@ describe('Triplet', () => {
4343
]);
4444
});
4545

46-
xtest('returns triplets with no factor smaller than minimum factor', () => {
46+
test('returns triplets with no factor smaller than minimum factor', () => {
4747
expect(tripletsWithSum(90, { minFactor: 10 })).toEqual([[15, 36, 39]]);
4848
});
4949

50-
xtest('returns triplets with no factor larger than maximum factor', () => {
50+
test('returns triplets with no factor larger than maximum factor', () => {
5151
expect(tripletsWithSum(840, { maxFactor: 349 })).toEqual([[240, 252, 348]]);
5252
});
5353

54-
xtest('returns triplets with factors in range', () => {
54+
test('returns triplets with factors in range', () => {
5555
expect(tripletsWithSum(840, { maxFactor: 352, minFactor: 150 })).toEqual([
5656
[210, 280, 350],
5757
[240, 252, 348],

test/fixtures/two-fer/error/syntax/two-fer.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ describe('twoFer()', () => {
55
expect(twoFer()).toEqual('One for you, one for me.');
66
});
77

8-
xtest('a name given', () => {
8+
test('a name given', () => {
99
const name = 'Alice';
1010
expect(twoFer(name)).toEqual('One for Alice, one for me.');
1111
});
1212

13-
xtest('another name given', () => {
13+
test('another name given', () => {
1414
const name = 'Bob';
1515
expect(twoFer(name)).toEqual('One for Bob, one for me.');
1616
});

test/fixtures/two-fer/fail/empty/two-fer.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ describe('twoFer()', () => {
55
expect(twoFer()).toEqual('One for you, one for me.');
66
});
77

8-
xtest('a name given', () => {
8+
test('a name given', () => {
99
const name = 'Alice';
1010
expect(twoFer(name)).toEqual('One for Alice, one for me.');
1111
});
1212

13-
xtest('another name given', () => {
13+
test('another name given', () => {
1414
const name = 'Bob';
1515
expect(twoFer(name)).toEqual('One for Bob, one for me.');
1616
});

test/fixtures/two-fer/fail/tests/two-fer.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ describe('twoFer()', () => {
55
expect(twoFer()).toEqual('One for you, one for me.');
66
});
77

8-
xtest('a name given', () => {
8+
test('a name given', () => {
99
const name = 'Alice';
1010
expect(twoFer(name)).toEqual('One for Alice, one for me.');
1111
});
1212

13-
xtest('another name given', () => {
13+
test('another name given', () => {
1414
const name = 'Bob';
1515
expect(twoFer(name)).toEqual('One for Bob, one for me.');
1616
});

test/fixtures/two-fer/pass/two-fer.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ describe('twoFer()', () => {
55
expect(twoFer()).toEqual('One for you, one for me.');
66
});
77

8-
xtest('a name given', () => {
8+
test('a name given', () => {
99
const name = 'Alice';
1010
expect(twoFer(name)).toEqual('One for Alice, one for me.');
1111
});
1212

13-
xtest('another name given', () => {
13+
test('another name given', () => {
1414
const name = 'Bob';
1515
expect(twoFer(name)).toEqual('One for Bob, one for me.');
1616
});

0 commit comments

Comments
 (0)