Fix tests

This commit is contained in:
Zef Hemel
2022-10-11 11:43:28 +02:00
parent 09ac3ea36a
commit 9dd94c5397
5 changed files with 20 additions and 6 deletions
+7 -1
View File
@@ -1,4 +1,4 @@
import { createSandbox } from "./environments/deno_sandbox.ts";
import { sandboxFactory } from "./environments/deno_sandbox.ts";
import { System } from "./system.ts";
import {
@@ -6,7 +6,10 @@ import {
assertEquals,
} from "https://deno.land/std@0.158.0/testing/asserts.ts";
import assetBundle from "../dist/asset_bundle.json" assert { type: "json" };
Deno.test("Run a deno sandbox", async () => {
const createSandbox = sandboxFactory(assetBundle as AssetBundle);
const system = new System("server");
system.registerSyscalls([], {
addNumbers: (_ctx, a, b) => {
@@ -122,9 +125,12 @@ Deno.test("Run a deno sandbox", async () => {
import { bundle as plugOsBundle } from "./bin/plugos-bundle.ts";
import { esbuild } from "./compile.ts";
import { AssetBundle } from "./asset_bundle_reader.ts";
const __dirname = new URL(".", import.meta.url).pathname;
Deno.test("Preload dependencies", async () => {
const createSandbox = sandboxFactory(assetBundle as AssetBundle);
const globalModules = await plugOsBundle(
`${__dirname}../plugs/global.plug.yaml`,
);