Skip to content

Commit e535665

Browse files
rogeliogcpojer
authored andcommitted
Add displayName to MPR (#4327)
* Modify flow types to support displayName * Add project displayName * Some small fixes * Add tests * Fix eslint * Better handling for non interactive terminals * Update tests * Use supportColor
1 parent 39f83a9 commit e535665

26 files changed

Lines changed: 152 additions & 93 deletions

integration_tests/__tests__/__snapshots__/console.test.js.snap

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

33
exports[`console printing 1`] = `
4-
" PASS __tests__/console.test.js
4+
"PASS __tests__/console.test.js
55
● Console
66
77
console.log __tests__/console.test.js:11
@@ -43,7 +43,7 @@ exports[`console printing with --verbose 1`] = `
4343
`;
4444
4545
exports[`console printing with --verbose 2`] = `
46-
" PASS __tests__/console.test.js
46+
"PASS __tests__/console.test.js
4747
✓ works just fine
4848
4949
"
@@ -61,7 +61,7 @@ Ran all test suites.
6161
exports[`does not print to console with --silent 1`] = `""`;
6262
6363
exports[`does not print to console with --silent 2`] = `
64-
" PASS __tests__/console.test.js
64+
"PASS __tests__/console.test.js
6565
6666
"
6767
`;

integration_tests/__tests__/__snapshots__/console_log_output_when_run_in_band.test.js.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

33
exports[`prints console.logs when run with forceExit 1`] = `
4-
" PASS __tests__/a-banana.js
4+
"PASS __tests__/a-banana.js
55
✓ banana
66
77
"

integration_tests/__tests__/__snapshots__/custom_reporters.test.js.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ Object {
6565
`;
6666

6767
exports[`Custom Reporters Integration default reporters enabled 1`] = `
68-
" PASS __tests__/add.test.js
68+
"PASS __tests__/add.test.js
6969
Custom Reporters
7070
✓ adds ok
7171

integration_tests/__tests__/__snapshots__/failures.test.js.snap

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

33
exports[`not throwing Error objects 1`] = `
4-
" FAIL __tests__/throw_number.test.js
4+
"FAIL __tests__/throw_number.test.js
55
● Test suite failed to run
66
77
Expected an Error, but \\"1\\" was thrown
@@ -10,7 +10,7 @@ exports[`not throwing Error objects 1`] = `
1010
`;
1111

1212
exports[`not throwing Error objects 2`] = `
13-
" FAIL __tests__/throw_string.test.js
13+
"FAIL __tests__/throw_string.test.js
1414
● Test suite failed to run
1515
1616
Error
@@ -20,7 +20,7 @@ exports[`not throwing Error objects 2`] = `
2020
`;
2121

2222
exports[`not throwing Error objects 3`] = `
23-
" FAIL __tests__/throw_object.test.js
23+
"FAIL __tests__/throw_object.test.js
2424
● Test suite failed to run
2525
2626
Error: No message was provided
@@ -29,7 +29,7 @@ exports[`not throwing Error objects 3`] = `
2929
`;
3030

3131
exports[`not throwing Error objects 4`] = `
32-
" FAIL __tests__/assertion_count.test.js
32+
"FAIL __tests__/assertion_count.test.js
3333
● .assertions() › throws
3434
expect(received).toBeTruthy()
3535
Expected value to be truthy, instead received
@@ -59,7 +59,7 @@ exports[`not throwing Error objects 4`] = `
5959
`;
6060

6161
exports[`works with node assert 1`] = `
62-
" FAIL __tests__/node_assertion_error.test.js
62+
"FAIL __tests__/node_assertion_error.test.js
6363
● assert
6464
6565
assert.equal(received, expected) or assert(received)

integration_tests/__tests__/__snapshots__/globals.test.js.snap

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

33
exports[`basic test constructs 1`] = `
4-
" PASS __tests__/basic.test-constructs.test.js
4+
"PASS __tests__/basic.test-constructs.test.js
55
✓ it
66
✓ test
77
describe
@@ -21,7 +21,7 @@ Ran all test suites.
2121
`;
2222
2323
exports[`only 1`] = `
24-
" PASS __tests__/only-constructs.test.js
24+
"PASS __tests__/only-constructs.test.js
2525
✓ test.only
2626
✓ it.only
2727
✓ fit
@@ -47,7 +47,7 @@ Ran all test suites.
4747
`;
4848
4949
exports[`only with expand arg 1`] = `
50-
" PASS __tests__/only-constructs.test.js
50+
"PASS __tests__/only-constructs.test.js
5151
○ it
5252
✓ test.only
5353
✓ it.only
@@ -73,7 +73,7 @@ Ran all test suites.
7373
`;
7474
7575
exports[`skips 1`] = `
76-
" PASS __tests__/skips-constructs.test.js
76+
"PASS __tests__/skips-constructs.test.js
7777
✓ it
7878
○ skipped 4 tests
7979
xdescribe
@@ -96,7 +96,7 @@ Ran all test suites.
9696
`;
9797
9898
exports[`skips with expand arg 1`] = `
99-
" PASS __tests__/skips-constructs.test.js
99+
"PASS __tests__/skips-constructs.test.js
100100
✓ it
101101
○ xtest
102102
○ xit
@@ -123,7 +123,7 @@ Ran all test suites.
123123
`;
124124
125125
exports[`tests with no implementation 1`] = `
126-
" PASS __tests__/only-constructs.test.js
126+
"PASS __tests__/only-constructs.test.js
127127
✓ it
128128
○ skipped 2 tests
129129
@@ -140,7 +140,7 @@ Ran all test suites.
140140
`;
141141
142142
exports[`tests with no implementation with expand arg 1`] = `
143-
" PASS __tests__/only-constructs.test.js
143+
"PASS __tests__/only-constructs.test.js
144144
✓ it
145145
○ it, no implementation
146146
○ test, no implementation

integration_tests/__tests__/__snapshots__/jest.config.js.test.js.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ exports[`traverses directory tree up until it finds jest.config 1`] = `
88
`;
99
1010
exports[`traverses directory tree up until it finds jest.config 2`] = `
11-
" PASS ../../../__tests__/a-banana.js
11+
"PASS ../../../__tests__/a-banana.js
1212
✓ banana
1313
✓ abc
1414
@@ -25,7 +25,7 @@ Ran all test suites.
2525
`;
2626
2727
exports[`works with jest.conf.js 1`] = `
28-
" PASS __tests__/a-banana.js
28+
"PASS __tests__/a-banana.js
2929
✓ banana
3030
3131
"

integration_tests/__tests__/__snapshots__/module_name_mapper.test.js.snap

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

33
exports[`moduleNameMapper correct configuration 1`] = `
4-
" PASS __tests__/index.js
4+
"PASS __tests__/index.js
55
✓ moduleNameMapping correct configuration
66
77
"
88
`;
99

1010
exports[`moduleNameMapper wrong configuration 1`] = `
11-
" FAIL __tests__/index.js
11+
"FAIL __tests__/index.js
1212
● Test suite failed to run
1313
1414
Configuration error:
Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

33
exports[`can pass projects or global config 1`] = `
4-
"Test Suites: 2 failed, 2 total
4+
"Test Suites: 3 failed, 3 total
55
Tests: 0 total
66
Snapshots: 0 total
77
Time: <<REPLACED>>
@@ -10,29 +10,31 @@ Ran all test suites.
1010
`;
1111
1212
exports[`can pass projects or global config 2`] = `
13-
"Test Suites: 2 passed, 2 total
14-
Tests: 2 passed, 2 total
13+
"Test Suites: 3 passed, 3 total
14+
Tests: 3 passed, 3 total
1515
Snapshots: 0 total
1616
Time: <<REPLACED>>
17-
Ran all test suites in 2 projects.
17+
Ran all test suites in 3 projects.
1818
"
1919
`;
2020
2121
exports[`can pass projects or global config 3`] = `
22-
"PASS project1/__tests__/file1.test.js
23-
PASS project2/__tests__/file1.test.js"
22+
"PASS BACKEND project1/__tests__/file1.test.js
23+
PASS UI project3/__tests__/file1.test.js
24+
PASS project2/__tests__/file1.test.js"
2425
`;
2526
2627
exports[`can pass projects or global config 4`] = `
27-
"Test Suites: 2 passed, 2 total
28-
Tests: 2 passed, 2 total
28+
"Test Suites: 3 passed, 3 total
29+
Tests: 3 passed, 3 total
2930
Snapshots: 0 total
3031
Time: <<REPLACED>>
31-
Ran all test suites in 2 projects.
32+
Ran all test suites in 3 projects.
3233
"
3334
`;
3435
3536
exports[`can pass projects or global config 5`] = `
36-
"PASS project1/__tests__/file1.test.js
37-
PASS project2/__tests__/file1.test.js"
37+
"PASS BACKEND project1/__tests__/file1.test.js
38+
PASS UI project3/__tests__/file1.test.js
39+
PASS project2/__tests__/file1.test.js"
3840
`;

integration_tests/__tests__/__snapshots__/timeouts.test.js.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

33
exports[`does not exceed the timeout 1`] = `
4-
" PASS __tests__/a-banana.js
4+
"PASS __tests__/a-banana.js
55
✓ banana
66
77
"

integration_tests/__tests__/compare_dom_nodes.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ skipOnWindows.suite();
1717
test('does not crash when expect involving a DOM node fails', () => {
1818
const result = runJest('compare-dom-nodes');
1919

20-
expect(result.stderr).toContain('FAIL __tests__/failed-assertion.js');
20+
expect(result.stderr).toContain('FAIL __tests__/failed-assertion.js');
2121
});

0 commit comments

Comments
 (0)