Skip to content

Commit 989caf4

Browse files
eriktromMasterOdin
andauthored
Update test/port-finder.test.js
Use beforeAll/afterAll w/o done callback in test setup/teardown per pr review feedback Co-authored-by: Matthew Peveler <[email protected]>
1 parent 65274a6 commit 989caf4

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

test/port-finder.test.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,13 +155,11 @@ describe('with no existing servers', function () {
155155

156156

157157
describe('with startPort provided', function () {
158-
beforeEach(function (done) {
158+
beforeAll(function (done) {
159159
portfinder.basePort = 8000;
160-
done();
161160
});
162-
afterEach(function (done) {
161+
afterAll(function () {
163162
portfinder.basePort = basePort;
164-
done();
165163
});
166164
describe.each([
167165
['getPort()', false, portfinder.getPort],

0 commit comments

Comments
 (0)