diff --git a/test/__snapshots__/reader.test.js.snap b/test/__snapshots__/reader.test.js.snap index bcf6a06..6c978c4 100644 --- a/test/__snapshots__/reader.test.js.snap +++ b/test/__snapshots__/reader.test.js.snap @@ -61755,7 +61755,7 @@ exports[`should replace NODE_ENV with default of "development" 1`] = ` { 1: [ function(require, module, exports) { - console.log(\\"test\\"); + console.log(\\"development\\"); }, {} ] diff --git a/test/reader.test.js b/test/reader.test.js index 4c6d344..acdf633 100644 --- a/test/reader.test.js +++ b/test/reader.test.js @@ -427,6 +427,8 @@ test('multiple entrypoints in same feed supported', async () => { test('should replace NODE_ENV with default of "development"', async () => { expect.hasAssertions(); + const env = process.env.NODE_ENV; + delete process.env.NODE_ENV; const result = await bundleJS([ [ { @@ -438,8 +440,9 @@ test('should replace NODE_ENV with default of "development"', async () => { }, ], ]); - expect(result).toMatch('test'); + expect(result).toMatch('development'); expect(prettier.format(result)).toMatchSnapshot(); + process.env.NODE_ENV = env; }); test('should replace NODE_ENV with process.env.NODE_ENV', async () => {