Skip to content

Commit

Permalink
chore: typo
Browse files Browse the repository at this point in the history
  • Loading branch information
Kocal committed Mar 24, 2020
1 parent 96a666b commit bdd553a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/WebpackConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,7 @@ class WebpackConfig {

enableForkedTypeScriptTypesChecking(forkedTypeScriptTypesCheckOptionsCallback = () => {}) {
if (this.useBabelTypeScriptPreset) {
throw new Error('Encore.enableBabelTypeScriptPreset() can not be called when Encore.enableForkedTypeScriptTypesChecking() has been called.');
throw new Error('Encore.enableForkedTypeScriptTypesChecking() can not be called when Encore.enableBabelTypeScriptPreset() has been called.');
}

if (typeof forkedTypeScriptTypesCheckOptionsCallback !== 'function') {
Expand Down
8 changes: 4 additions & 4 deletions test/WebpackConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -873,7 +873,7 @@ describe('WebpackConfig object', () => {
}).to.throw('must be a callback function');
});

it('TypeScript can not be compiled by ts-loader is Babel is already handling TypeScript', () => {
it('TypeScript can not be compiled by ts-loader if Babel is already handling TypeScript', () => {
const config = createConfig();
config.enableBabelTypeScriptPreset();

Expand Down Expand Up @@ -903,11 +903,11 @@ describe('WebpackConfig object', () => {

it('TypeScript can not be compiled by Babel if forked types checking is enabled', () => {
const config = createConfig();
config.enableForkedTypeScriptTypesChecking();
config.enableBabelTypeScriptPreset();

expect(function() {
config.enableBabelTypeScriptPreset();
}).to.throw('Encore.enableBabelTypeScriptPreset() can not be called when Encore.enableForkedTypeScriptTypesChecking() has been called.');
config.enableForkedTypeScriptTypesChecking();
}).to.throw('Encore.enableForkedTypeScriptTypesChecking() can not be called when Encore.enableBabelTypeScriptPreset() has been called.');
});
});

Expand Down

0 comments on commit bdd553a

Please sign in to comment.