From cc76818b1e53e97f5fb74abf1de1fbcdbac2d7e7 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Tue, 15 May 2018 09:18:49 +0200 Subject: [PATCH] remove cleanup --- .../__tests__/__snapshots__/globals.test.js.snap | 4 ++-- integration-tests/__tests__/globals.test.js | 14 ++++---------- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/integration-tests/__tests__/__snapshots__/globals.test.js.snap b/integration-tests/__tests__/__snapshots__/globals.test.js.snap index 30496da2c554..b15523f05467 100644 --- a/integration-tests/__tests__/__snapshots__/globals.test.js.snap +++ b/integration-tests/__tests__/__snapshots__/globals.test.js.snap @@ -31,7 +31,7 @@ exports[`cannot test with no implementation 1`] = ` | ^ 4 | test('test, no implementation'); 5 | - + at packages/jest-jasmine2/build/jasmine/Env.js:<>:<> at __tests__/only-constructs.test.js:<>:<> @@ -59,7 +59,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:<>:<> at __tests__/only-constructs.test.js:<>:<> diff --git a/integration-tests/__tests__/globals.test.js b/integration-tests/__tests__/globals.test.js index ba3d5580e954..22a8e60f6041 100644 --- a/integration-tests/__tests__/globals.test.js +++ b/integration-tests/__tests__/globals.test.js @@ -28,12 +28,6 @@ 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 = ` @@ -129,8 +123,8 @@ test('cannot test with no implementation', () => { expect(status).toBe(1); const {summary, rest} = extractSummary(stderr, {stripLocation: true}); - expect(clean(rest)).toMatchSnapshot(); - expect(clean(summary)).toMatchSnapshot(); + expect(rest).toMatchSnapshot(); + expect(summary).toMatchSnapshot(); }); test('skips with expand arg', () => { @@ -207,8 +201,8 @@ test('cannot test with no implementation with expand arg', () => { expect(status).toBe(1); const {summary, rest} = extractSummary(stderr, {stripLocation: true}); - expect(clean(rest)).toMatchSnapshot(); - expect(clean(summary)).toMatchSnapshot(); + expect(rest).toMatchSnapshot(); + expect(summary).toMatchSnapshot(); }); test('function as descriptor', () => {