Skip to content
This repository has been archived by the owner on Jun 24, 2024. It is now read-only.

Commit

Permalink
test: fix incorrect test
Browse files Browse the repository at this point in the history
  • Loading branch information
digitalsadhu committed Feb 6, 2018
1 parent 13eb98a commit 742677c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test/__snapshots__/reader.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -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\\");
},
{}
]
Expand Down
5 changes: 4 additions & 1 deletion test/reader.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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([
[
{
Expand All @@ -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 () => {
Expand Down

0 comments on commit 742677c

Please sign in to comment.