Skip to content

Commit 5826e24

Browse files
committed
test: add test for change
1 parent f6ef65a commit 5826e24

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

lib/Server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ if (!process.env.WEBPACK_SERVE) {
4040

4141
class Server {
4242
constructor(options = {}, compiler) {
43-
// TODO: remove this after updating serve package
43+
// TODO: remove this after plugin support is published
4444
if (options.hooks) {
4545
[options, compiler] = [compiler, options];
4646
}

test/server/Server.test.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,21 @@ describe('Server', () => {
6767
compiler.run(() => {});
6868
});
6969

70+
// TODO: remove this after plugin support is published
71+
it('should create and run server with old parameters order', (done) => {
72+
const compiler = webpack(config);
73+
const server = new Server(compiler, baseDevConfig);
74+
75+
getEntries(server);
76+
77+
compiler.hooks.done.tap('webpack-dev-server', () => {
78+
expect(entries).toMatchSnapshot();
79+
server.close(done);
80+
});
81+
82+
compiler.run(() => {});
83+
});
84+
7085
it('add hot-only option', (done) => {
7186
const compiler = webpack(config);
7287
const server = createServer(

0 commit comments

Comments
 (0)