Skip to content
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
Fix snapshots
  • Loading branch information
Miguel Jimenez Esun committed May 2, 2018
commit 0fd8d6d1839e176be3c7b77b46df27e7c1d03d45
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ exports[`cannot test with no implementation 1`] = `
| ^
4 | test('test, no implementation');
5 |

at packages/jest-jasmine2/build/jasmine/Env.js:<<LINE>>:<<COLUMN>>
at __tests__/only-constructs.test.js:<<LINE>>:<<COLUMN>>

Expand Down Expand Up @@ -60,7 +60,7 @@ exports[`cannot test with no implementation with expand arg 1`] = `
| ^
4 | test('test, no implementation');
5 |

at packages/jest-jasmine2/build/jasmine/Env.js:<<LINE>>:<<COLUMN>>
at __tests__/only-constructs.test.js:<<LINE>>:<<COLUMN>>

Expand Down
14 changes: 10 additions & 4 deletions integration-tests/__tests__/globals.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ beforeEach(() => {

afterAll(() => cleanup(DIR));

// This function is needed due to differences between Node 6 and 8-9-10 when
// returning the result of the error.
function clean(text) {
return text.replace(/([\r\n])\s+(?=[\r\n])/g, '$1').replace(/\s+\^/g, ' ^');
}

test('basic test constructs', () => {
const filename = 'basic.test-constructs.test.js';
const content = `
Expand Down Expand Up @@ -123,8 +129,8 @@ test('cannot test with no implementation', () => {
expect(status).toBe(1);

const {summary, rest} = extractSummary(stderr, {stripLocation: true});
expect(rest).toMatchSnapshot();
expect(summary).toMatchSnapshot();
expect(clean(rest)).toMatchSnapshot();
expect(clean(summary)).toMatchSnapshot();
});

test('skips with expand arg', () => {
Expand Down Expand Up @@ -201,8 +207,8 @@ test('cannot test with no implementation with expand arg', () => {
expect(status).toBe(1);

const {summary, rest} = extractSummary(stderr, {stripLocation: true});
expect(rest).toMatchSnapshot();
expect(summary).toMatchSnapshot();
expect(clean(rest)).toMatchSnapshot();
expect(clean(summary)).toMatchSnapshot();
});

test('function as descriptor', () => {
Expand Down