-
-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathbasic-multi.test.js
31 lines (19 loc) · 920 Bytes
/
basic-multi.test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
const fs = require('fs');
const path = require('path');
const expect = require('chai').expect;
const webpack = require('webpack');
const config = require('../examples/basic-multi/webpack.config');
describe('Basic Multi', function() {
it('Adds a static partial to the body of 2 different instances', (done) => {
webpack(config, (error, result) => {
expect(error).to.equal(null);
const index_html = result.compilation.assets['index.html'].source();
const index_fixture = fs.readFileSync(path.resolve(__dirname, 'fixtures/basic-multi-index.html')).toString();
expect(index_html).to.equal(index_fixture);
const other_html = result.compilation.assets['other-page.html'].source();
const other_fixture = fs.readFileSync(path.resolve(__dirname, 'fixtures/basic-multi-other.html')).toString();
expect(other_html).to.equal(other_fixture);
done();
});
});
});