Skip to content

Commit 018fe67

Browse files
test(std): remove custom resolver config
1 parent 5d1c390 commit 018fe67

File tree

1 file changed

+18
-6
lines changed

1 file changed

+18
-6
lines changed

packages/jco-std/test/e2e/apps.ts

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,27 @@ import { componentize } from "@bytecodealliance/componentize-js";
1111

1212
import { rolldown } from "rolldown";
1313

14+
/** Path to fixture app directory */
1415
const FIXTURE_APPS_DIR = fileURLToPath(new URL("../fixtures/apps", import.meta.url));
1516

17+
/** Path to jco-std directory */
1618
const JCO_STD_DIR = fileURLToPath(new URL("../../", import.meta.url));
1719

20+
/** Resolver configuration that can be used with rolldown when building test components */
21+
const TEST_RESOLVER_CONFIG = {
22+
alias: {
23+
'@bytecodealliance/jco-std/wasi/0.2.3/http/adapters/hono/server': join(JCO_STD_DIR, "dist/0.2.3/http/adapters/hono/server.js"),
24+
'@bytecodealliance/jco-std/wasi/0.2.3/http/adapters/hono/middleware/env': join(JCO_STD_DIR, "dist/0.2.3/http/adapters/hono/middleware/env.js"),
25+
'@bytecodealliance/jco-std/wasi/0.2.3/http/adapters/hono/middleware/config': join(JCO_STD_DIR, "dist/0.2.3/http/adapters/hono/middleware/config.js"),
26+
'@bytecodealliance/jco-std/wasi/0.2.6/http/adapters/hono/server': join(JCO_STD_DIR, "dist/0.2.6/http/adapters/hono/server.js"),
27+
'@bytecodealliance/jco-std/wasi/0.2.6/http/adapters/hono/middleware/env': join(JCO_STD_DIR, "dist/0.2.6/http/adapters/hono/middleware/env.js"),
28+
'@bytecodealliance/jco-std/wasi/0.2.6/http/adapters/hono/middleware/config': join(JCO_STD_DIR, "dist/0.2.6/http/adapters/hono/middleware/config.js"),
29+
'@bytecodealliance/jco-std/wasi/0.2.x/http/adapters/hono/server': join(JCO_STD_DIR, "dist/0.2.6/http/adapters/hono/server.js"),
30+
'@bytecodealliance/jco-std/wasi/0.2.x/http/adapters/hono/middleware/env': join(JCO_STD_DIR, "dist/0.2.6/http/adapters/hono/middleware/env.js"),
31+
'@bytecodealliance/jco-std/wasi/0.2.x/http/adapters/hono/middleware/config': join(JCO_STD_DIR, "dist/0.2.6/http/adapters/hono/middleware/config.js"),
32+
},
33+
}
34+
1835
/** Get the binary path to wasmtime if it doesn't exist */
1936
async function getWasmtimeBin(env?: Record<string, string>): Promise<string> {
2037
try {
@@ -95,12 +112,7 @@ suite("hono apps", async () => {
95112
external: [
96113
/^wasi:.*/,
97114
],
98-
resolve: {
99-
alias: {
100-
'@bytecodealliance/jco-std/wasi/0.2.3/http/adapters/hono': join(JCO_STD_DIR, "dist/0.2.3/http/adapters/hono.js"),
101-
'@bytecodealliance/jco-std/wasi/0.2.6/http/adapters/hono': join(JCO_STD_DIR, "dist/0.2.6/http/adapters/hono.js"),
102-
},
103-
},
115+
resolve: TEST_RESOLVER_CONFIG,
104116
});
105117
await bundle.write({
106118
file: jsOutputPath,

0 commit comments

Comments
 (0)