mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-24 10:12:53 +02:00
JEST: Enable restoreMocks option and fix lint errors (#2333)
* JEST: Enable restoreMocks option and fix lint errors * Fix test\jest\Save.test.ts
This commit is contained in:
@@ -25,6 +25,9 @@ test("Edge cases of disableLog", function () {
|
||||
const ws = new WorkerScript(runningScript, 1, NetscriptFunctions);
|
||||
|
||||
const ns = ws.env.vars;
|
||||
if (!ns) {
|
||||
throw new Error("Invalid ws.env.vars");
|
||||
}
|
||||
|
||||
// Generate logs in a specific pattern that checks edge cases in
|
||||
// disableLog. We want to check various combinations of things that
|
||||
@@ -82,6 +85,8 @@ test("Edge cases of disableLog", function () {
|
||||
"end",
|
||||
]);
|
||||
} finally {
|
||||
DeleteServer(server.hostname);
|
||||
if (server) {
|
||||
DeleteServer(server.hostname);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user