mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-05-03 14:27:03 +02:00
DARKNET: Darkweb Expansion Project & Bitnode (#2139)
This is BN15. It is a really big change; see the PR for all the details.
This commit is contained in:
committed by
GitHub
parent
a674633f6c
commit
6073964768
@@ -20,7 +20,27 @@ describe("v3", () => {
|
||||
|
||||
const mockedDownload = jest.spyOn(FileUtils, "downloadContentAsFile");
|
||||
|
||||
const originalConsoleError = console.error;
|
||||
const originalConsoleWarning = console.warn;
|
||||
const consoleError = jest.spyOn(console, "error").mockImplementation((...data: unknown[]) => {
|
||||
if (Array.isArray(data) && data.length > 0 && (data[0] === "There was no Darknet savedata" || data[0] === "")) {
|
||||
return;
|
||||
}
|
||||
originalConsoleError(...data);
|
||||
});
|
||||
const consoleWarning = jest.spyOn(console, "warn").mockImplementation((...data: unknown[]) => {
|
||||
if (
|
||||
Array.isArray(data) &&
|
||||
data.length > 0 &&
|
||||
(data[0] === "Encountered the following issue while loading Darknet savedata:" || data[0] === "Savedata:")
|
||||
) {
|
||||
return;
|
||||
}
|
||||
originalConsoleWarning(...data);
|
||||
});
|
||||
await loadGame(await db.load());
|
||||
consoleError.mockRestore();
|
||||
consoleWarning.mockRestore();
|
||||
|
||||
// Check if auto-migration works
|
||||
expect(
|
||||
|
||||
Reference in New Issue
Block a user