Skip to content

Commit 7930579

Browse files
committed
Only test with jest 29+
1 parent 813caab commit 7930579

File tree

6 files changed

+508
-494
lines changed

6 files changed

+508
-494
lines changed

.github/workflows/nodejs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
fail-fast: false
1818
matrix:
1919
node-version: [18.x, 19.x, 20.x]
20-
jest-version: [24, 25, 26, 27, 28, 29]
20+
jest-version: [29]
2121
runs-on: ubuntu-latest
2222

2323
steps:

__tests__/__snapshots__/buildJsonResults.test.js.snap

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

33
exports[`buildJsonResults should support displayName template var for jest multi-project 1`] = `
4-
Object {
5-
"testsuites": Array [
6-
Object {
7-
"_attr": Object {
4+
{
5+
"testsuites": [
6+
{
7+
"_attr": {
88
"errors": 0,
99
"failures": 0,
1010
"name": "jest tests",
1111
"tests": 2,
1212
"time": 1.234,
1313
},
1414
},
15-
Object {
16-
"testsuite": Array [
17-
Object {
18-
"_attr": Object {
15+
{
16+
"testsuite": [
17+
{
18+
"_attr": {
1919
"errors": 0,
2020
"failures": 0,
2121
"name": "project1-foo",
@@ -25,22 +25,22 @@ Object {
2525
"timestamp": "2018-02-10T14:52:31",
2626
},
2727
},
28-
Object {
29-
"properties": Array [
30-
Object {
31-
"property": Object {
32-
"_attr": Object {
28+
{
29+
"properties": [
30+
{
31+
"property": {
32+
"_attr": {
3333
"name": "best-tester",
3434
"value": "Jason Palmer",
3535
},
3636
},
3737
},
3838
],
3939
},
40-
Object {
41-
"testcase": Array [
42-
Object {
43-
"_attr": Object {
40+
{
41+
"testcase": [
42+
{
43+
"_attr": {
4444
"classname": "a thing should foo",
4545
"name": "project1-bar",
4646
"time": 0.003,
@@ -50,10 +50,10 @@ Object {
5050
},
5151
],
5252
},
53-
Object {
54-
"testsuite": Array [
55-
Object {
56-
"_attr": Object {
53+
{
54+
"testsuite": [
55+
{
56+
"_attr": {
5757
"errors": 0,
5858
"failures": 0,
5959
"name": "project2-foo",
@@ -63,22 +63,22 @@ Object {
6363
"timestamp": "2018-02-10T14:52:31",
6464
},
6565
},
66-
Object {
67-
"properties": Array [
68-
Object {
69-
"property": Object {
70-
"_attr": Object {
66+
{
67+
"properties": [
68+
{
69+
"property": {
70+
"_attr": {
7171
"name": "best-tester",
7272
"value": "Jason Palmer",
7373
},
7474
},
7575
},
7676
],
7777
},
78-
Object {
79-
"testcase": Array [
80-
Object {
81-
"_attr": Object {
78+
{
79+
"testcase": [
80+
{
81+
"_attr": {
8282
"classname": "another thing should foo",
8383
"name": "project2-bar",
8484
"time": 0.001,

__tests__/buildJsonResults.test.js

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -454,21 +454,21 @@ describe('buildJsonResults', () => {
454454
});
455455

456456
expect(jsonResults).toMatchInlineSnapshot(`
457-
Object {
458-
"testsuites": Array [
459-
Object {
460-
"_attr": Object {
457+
{
458+
"testsuites": [
459+
{
460+
"_attr": {
461461
"errors": 0,
462462
"failures": 0,
463463
"name": "jest tests",
464464
"tests": 1,
465465
"time": 1.234,
466466
},
467467
},
468-
Object {
469-
"testsuite": Array [
470-
Object {
471-
"_attr": Object {
468+
{
469+
"testsuite": [
470+
{
471+
"_attr": {
472472
"errors": 0,
473473
"failures": 0,
474474
"name": "foo",
@@ -478,32 +478,32 @@ Object {
478478
"timestamp": "2017-03-17T01:05:47",
479479
},
480480
},
481-
Object {
482-
"properties": Array [
483-
Object {
484-
"property": Object {
485-
"_attr": Object {
481+
{
482+
"properties": [
483+
{
484+
"property": {
485+
"_attr": {
486486
"name": "best-tester",
487487
"value": "Jason Palmer",
488488
},
489489
},
490490
},
491491
],
492492
},
493-
Object {
494-
"testcase": Array [
495-
Object {
496-
"_attr": Object {
493+
{
494+
"testcase": [
495+
{
496+
"_attr": {
497497
"classname": "foo baz should bar",
498498
"name": "foo baz should bar",
499499
"time": 0.001,
500500
},
501501
},
502-
Object {
503-
"properties": Array [
504-
Object {
505-
"property": Object {
506-
"_attr": Object {
502+
{
503+
"properties": [
504+
{
505+
"property": {
506+
"_attr": {
507507
"name": "dd_tags[test.invocations]",
508508
"value": 2,
509509
},

jest.config.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,5 @@ module.exports = {
1313
"<rootDir>/integration-tests/testResultsProcessor/",
1414
"<rootDir>/integration-tests/reporter/"
1515
],
16-
reporters: ['default', '.'],
17-
snapshotFormat: {
18-
escapeString: true,
19-
printBasicPrototype: true
20-
}
16+
reporters: ['default', '.']
2117
};

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"xml": "^1.0.1"
2525
},
2626
"devDependencies": {
27-
"jest": "^28",
27+
"jest": "^29",
2828
"libxmljs2": "^0.33.0",
2929
"slash": "^3.0.0"
3030
}

0 commit comments

Comments
 (0)