release: WRNexusJS 0.8.0
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
import { expect, test } from "bun:test";
|
||||
import { analyzeRuntimeImports, runtimeCapabilities } from "../src/index.ts";
|
||||
|
||||
test("edge and workers reject Node capabilities with stable diagnostics", () => {
|
||||
const source = `import fs from "node:fs";\nimport { connect } from "node:net";`;
|
||||
expect(analyzeRuntimeImports(source, "edge").map((item) => item.capability)).toEqual([
|
||||
"filesystem",
|
||||
"tcp",
|
||||
]);
|
||||
expect(analyzeRuntimeImports(source, "bun")).toEqual([]);
|
||||
expect(runtimeCapabilities("service-worker").has("filesystem")).toBe(false);
|
||||
});
|
||||
Reference in New Issue
Block a user