mirror of
https://github.com/anomalyco/opencode.git
synced 2026-08-05 10:29:50 +00:00
17 lines
681 B
TypeScript
17 lines
681 B
TypeScript
import { expect, test } from "bun:test"
|
|
import { fileURLToPath } from "node:url"
|
|
import { collectNodeAssets } from "../script/node-assets"
|
|
import { nodeTarget, shellParserWasmAssets } from "../src/node/target"
|
|
|
|
test("collects each SEA asset key once", async () => {
|
|
const assets = await collectNodeAssets(nodeTarget(process.platform, process.arch))
|
|
const keys = assets.map((asset) => asset.key)
|
|
|
|
expect(new Set(keys).size).toBe(keys.length)
|
|
expect(assets.filter((asset) => asset.key === shellParserWasmAssets.runtime)).toEqual([
|
|
{
|
|
key: shellParserWasmAssets.runtime,
|
|
source: fileURLToPath(import.meta.resolve(shellParserWasmAssets.runtime)),
|
|
},
|
|
])
|
|
})
|