Skip to content

Commit

Permalink
tests: devtool-flag
Browse files Browse the repository at this point in the history
  • Loading branch information
snitin315 committed Jun 26, 2020
1 parent 26c9638 commit c8508ef
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions test/core-flags/devtool-flag.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
'use strict';

const { run } = require('../utils/test-utils');

describe('--devtool flag', () => {
it('should set devtool option', () => {
const { stderr, stdout } = run(__dirname, ['--devtool', 'source-map']);

expect(stderr).toBeFalsy();
expect(stdout).toContain(`devtool: 'source-map'`);
});

it('should throw error for invalid config', () => {
const { stderr, stdout } = run(__dirname, ['--devtool', 'invalid']);

expect(stderr).toContain('ValidationError: Invalid configuration object');
expect(stdout).toBeFalsy();
});
});

0 comments on commit c8508ef

Please sign in to comment.