Fix test for compiling multiple files

This commit is contained in:
Jan Nicklas 2016-01-11 12:20:46 +01:00 committed by Jan Nicklas
parent 7e4f83b26c
commit 3f16e3491a
1 changed files with 10 additions and 3 deletions

View File

@ -507,13 +507,20 @@ describe('HtmlWebpackPlugin', function() {
plugins: [
new HtmlWebpackPlugin(),
new HtmlWebpackPlugin({
filename: 'test.html',
filename: 'second-file.html',
template: path.join(__dirname, 'fixtures/test.html')
}),
new HtmlWebpackPlugin({
filename: 'third-file.html',
template: path.join(__dirname, 'fixtures/test.html')
})
]
}, ['<script src="index_bundle.js"'], null, done);
}, ['<script src="index_bundle.js"'], null, function(){
expect(fs.existsSync(path.join(OUTPUT_DIR, 'second-file.html'))).toBe(true);
expect(fs.existsSync(path.join(OUTPUT_DIR, 'third-file.html'))).toBe(true);
done();
});
expect(fs.existsSync(path.join(__dirname, 'fixtures/test.html'))).toBe(true);
});
it('should inject js css files even if the html file is incomplete', function (done) {