Skip to content

Commit db845b3

Browse files
randunelsaghul
authored andcommitted
Test stopping server.
1 parent 244e0ed commit db845b3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/abstract-socket.test.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ describe('server', function() {
2424
done();
2525
});
2626
});
27+
28+
it('should stop listening when close is called', () => new Promise(resolve => {
29+
server.close(resolve);
30+
})
31+
.then(() => exec('lsof -U'))
32+
.then(output => output.should.not.containEql(`@${SOCKET_NAME.slice(1)}`)));
2733
});
2834

2935
describe('client connections', function() {

0 commit comments

Comments
 (0)