Fix tests
This commit is contained in:
@@ -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`,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user