Skip to content

Commit

Permalink
add initFs test
Browse files Browse the repository at this point in the history
  • Loading branch information
caiiiycuk committed Oct 3, 2024
1 parent 19a07df commit 33e3a93
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/src/test-dos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,22 @@ function testServer(factory: CIFactory, name: string, assets: string) {
await ci.exit();
});

test(name + " can config js-dos through initFs", async () => {
const dosboxConf = "[autoexec]\necho \"ok\"\n";
const jsdosConf = "{\"initFs\":true}";
const ci = await factory(
[
{ path: ".jsdos/dosbox.conf", contents: new TextEncoder().encode(dosboxConf) },
{ path: ".jsdos/jsdos.json", contents: new TextEncoder().encode(jsdosConf) },
],
);
assert.ok(ci);
const config = await ci.config();
assert.equal(config.dosboxConf, dosboxConf);
assert.equal(JSON.stringify(config.jsdosConf), jsdosConf);
await ci.exit();
});

suite(name + ".persistency");

let cachedBundle: Uint8Array = new Uint8Array();
Expand Down

0 comments on commit 33e3a93

Please sign in to comment.