tests/server: Tear down test fixtures in the order they were setup

if for whatever reason before() fails to import the server, it causes after()
to fail on the first line, so it doesn't restore stubs; causing other errors
to be printed in other tests ("TypeError: Attempted to wrap warn which is
already wrapped")
This commit is contained in:
Val Lorentz 2023-03-17 17:10:19 +01:00
parent eb509f7100
commit 0dd74a93bf

View File

@ -39,10 +39,10 @@ describe("Server", function () {
});
after(function (done) {
server.close(done);
logInfoStub.restore();
logWarnStub.restore();
checkForUpdatesStub.restore();
server.close(done);
});
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions