mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-29 17:37:34 +01:00
20 lines
531 B
TypeScript
20 lines
531 B
TypeScript
import { Script } from "../../../src/Script/Script";
|
|
|
|
const code = `/** @param {NS} ns */
|
|
export async function main(ns) {
|
|
ns.print(ns.getWeakenTime('n00dles'));
|
|
}`;
|
|
|
|
describe("Validate Save Script Works", function () {
|
|
it("Save", function () {
|
|
const server = "home";
|
|
const filename = "test.js";
|
|
const script = new Script();
|
|
script.saveScript(filename, code, server, []);
|
|
|
|
expect(script.filename).toEqual(filename);
|
|
expect(script.code).toEqual(code);
|
|
expect(script.server).toEqual(server);
|
|
});
|
|
});
|