Skip to content

Commit

Permalink
Add removed Babel test back
Browse files Browse the repository at this point in the history
  • Loading branch information
Lyrkan committed Dec 22, 2020
1 parent 216a5ca commit 8d7843a
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/functional.js
Original file line number Diff line number Diff line change
Expand Up @@ -1075,6 +1075,22 @@ module.exports = {
});
});

it('Babel is executed on .js files', (done) => {
const config = createWebpackConfig('www/build', 'dev');
config.setPublicPath('/build');
config.addEntry('main', './js/class-syntax');

testSetup.runWebpack(config, (webpackAssert) => {
// check that babel transformed the class
webpackAssert.assertOutputFileDoesNotContain(
'main.js',
'class A {}'
);

done();
});
});

it('Babel can be configured via .babelrc', (done) => {
// create the .babelrc file first, so we see it
const appDir = testSetup.createTestAppDir();
Expand Down

0 comments on commit 8d7843a

Please sign in to comment.