Skip to content

Commit

Permalink
convert error into warning
Browse files Browse the repository at this point in the history
test for successful config set when using devServer and setPublicPath
with an absolute URL
  • Loading branch information
robertfausk authored and weaverryan committed Jul 21, 2017
1 parent 910b6bc commit eb5565b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions test/WebpackConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,12 @@ describe('WebpackConfig object', () => {
}).to.throw('The value passed to setPublicPath() must start with "/"');
});

it('Setting to a URL when using devServer throws an error', () => {
it('You can set to a URL when using devServer', () => {
const config = createConfig();
config.runtimeConfig.useDevServer = true;
config.setPublicPath('https://examplecdn.com');

expect(() => {
config.setPublicPath('https://examplecdn.com');
}).to.throw('You cannot pass an absolute URL to setPublicPath() and use the dev-server');
expect(config.publicPath).to.equal('https://examplecdn.com/');
});
});

Expand Down

0 comments on commit eb5565b

Please sign in to comment.