Skip to content

Commit

Permalink
style(test): fix lint problem
Browse files Browse the repository at this point in the history
  • Loading branch information
knagaitsev committed Aug 7, 2019
1 parent 4d3637d commit ef58382
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bin/webpack-dev-server.js
Expand Up @@ -23,7 +23,7 @@ const serverData = {
server: null,
};
// we must pass an object that contains the server object as a property so that
// we can update this server property later, and setupExitSignals will be able to
// we can update this server property later, and setupExitSignals will be able to
// recognize that the server has been instantiated, because we will set
// serverData.server to the new server object.
setupExitSignals(serverData);
Expand Down
6 changes: 3 additions & 3 deletions test/server/utils/setupExitSignals.test.js
Expand Up @@ -8,7 +8,7 @@ describe('setupExitSignals', () => {
const signals = ['SIGINT', 'SIGTERM'];

beforeAll(() => {
exitSpy = jest.spyOn(process, 'exit').mockImplementation(() => { });
exitSpy = jest.spyOn(process, 'exit').mockImplementation(() => {});
server = {
close: jest.fn((callback) => {
callback();
Expand Down Expand Up @@ -41,12 +41,12 @@ describe('setupExitSignals', () => {
server: null,
};
setupExitSignals(serverData);

setTimeout(() => {
serverData.server = server;
process.emit(signal);
}, 500);

setTimeout(() => {
expect(server.close.mock.calls.length).toEqual(1);
expect(exitSpy.mock.calls.length).toEqual(1);
Expand Down

0 comments on commit ef58382

Please sign in to comment.