mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-17 23:08:36 +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:
@@ -6,8 +6,12 @@ import { Settings } from "../../src/Settings/Settings";
|
||||
import { Player, setPlayer } from "../../src/Player";
|
||||
import { PlayerObject } from "../../src/PersonObjects/Player/PlayerObject";
|
||||
import { UIEventEmitter, UIEventType } from "../../src/ui/UIEventEmitter";
|
||||
import { fixDoImportIssue } from "./Utilities";
|
||||
|
||||
jest.useFakeTimers();
|
||||
|
||||
fixDoImportIssue();
|
||||
|
||||
// Direct tests of loading and saving.
|
||||
// Tests here should try to be comprehensive (cover as much stuff as possible)
|
||||
// without requiring burdensome levels of maintenance when legitimate changes
|
||||
@@ -98,7 +102,7 @@ function loadStandardServers() {
|
||||
{
|
||||
"ctor": "Script",
|
||||
"data": {
|
||||
"code": "/** @param {NS} ns */\\nexport async function main(ns) {\\n return ns.asleep(1000000);\\n}",
|
||||
"code": "/** @param {NS} ns */\nexport async function main(ns) {\n return ns.asleep(1000000);\n}",
|
||||
"filename": "script.js",
|
||||
"module": {},
|
||||
"dependencies": [
|
||||
|
||||
Reference in New Issue
Block a user