Skip to content

Commit

Permalink
tests(serve): different defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
evenstensberg committed Nov 12, 2019
1 parent 1277cc9 commit 98d60b7
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

# Node dependencies
node_modules
!test/config/**/node_modules
!test/serve/shim/**/node_modules

# npm-debug log
npm-debug.*
Expand Down
6 changes: 3 additions & 3 deletions test/serve/serve-basic.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@ const { runWatch } = require('../utils/test-utils');
jest.setTimeout(20000);

const runServe = args => {
return runWatch(path.resolve(__dirname, '../config/serve-basic'), ['serve'].concat(args), false, 'main');
return runWatch(path.resolve(__dirname, './shim'), ['serve'].concat(args), false, 'main');
};

describe('basic serve usage', () => {
it('compiles without flags', async () => {
const { stdout, stderr } = await runServe([]);
expect(stdout).toContain('bundle.js');
expect(stdout).toContain('main.js');
expect(stdout).not.toContain('hot/dev-server.js');
expect(stderr).toHaveLength(0);
});

it('uses hot flag to alter bundle', async () => {
const { stdout, stderr } = await runServe(['--hot']);
expect(stdout).toContain('bundle.js');
expect(stdout).toContain('main.js');
expect(stdout).toContain('hot/dev-server.js');
expect(stderr).toHaveLength(0);
});
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit 98d60b7

Please sign in to comment.