Undo the test-suite workarounds for the broken manifests

With the manifests broken, b65f265 and 4539abb worked around the symptoms:
rootJs imported itself by relative path instead of as @pezkuwi/dev, a
hand-written dynamic.d.mts stood in for the .mjs, and suite.spec.ts declared
its own describe/it/expect and imported a .d.ts at run time, which failed
the file. All three are reverted to upstream's form.

The import-attribute check now expects `with`: Node 22 removed `assert`.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Satoshi Qazi MuhammedandClaude Opus 5.5 authored and SatoshiQaziMuhammed committed 2026-10-07 08:14:02 +04:00
1 parent f60cdd90c1
commit 8e81c9041e
4 files changed
+8 -18

No files matched your search

+6 -6
View File
@@ -3,16 +3,16 @@
import type { Describe, It } from '@pezkuwi/dev-test/env/suite.js';
declare const describe: Describe;
declare const it: It;
declare const expect: (value: unknown) => { toBe: (expected: boolean) => void; toEqual: (expected: unknown) => void };
import fs from 'node:fs';
import path from 'node:path';
import * as testRoot from './root.js';
import { runTests } from './rootTests.js';
declare const describe: Describe;
declare const it: It;
declare const expect: (value: unknown) => { toBe: (expected: boolean) => void; toEqual: (expected: unknown) => void };
runTests(testRoot);
describe('as-built output checks', (): void => {
@@ -91,8 +91,8 @@ describe('as-built output checks', (): void => {
jsIdx[type].includes(
type === 'cjs'
? 'require("@pezkuwi/dev/rootJs/testJson.json")'
// eslint-disable-next-line no-useless-escape
: "import testJson from '@pezkuwi/dev/rootJs/testJson.json' assert { type: \'json\' };"
// `with`, not `assert`: Node 22 removed import assertions
: "import testJson from '@pezkuwi/dev/rootJs/testJson.json' with { type: 'json' };"
)
).toBe(true);
})