Fix TypeScript type definitions for test suite

- Add explicit Describe and It interfaces with todo support
- Fix mock type compatibility in jest.ts
- Update import assertions to import attributes (assert -> with)
- Add dynamic.d.mts declaration file
- Fix spec files to use explicit type declarations
This commit is contained in:
2026-01-17 21:02:25 +03:00
parent cb6801a3cc
commit b65f265e87
9 changed files with 2987 additions and 2672 deletions
+5 -1
View File
@@ -1,7 +1,11 @@
// Copyright 2017-2026 @pezkuwi/dev authors & contributors
// SPDX-License-Identifier: Apache-2.0
/// <reference types="@pezkuwi/dev-test/globals.d.ts" />
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';
+4
View File
@@ -0,0 +1,4 @@
// Copyright 2017-2026 @pezkuwi/dev authors & contributors
// SPDX-License-Identifier: Apache-2.0
export function sum(a: number, b: number): number;
+1 -1
View File
@@ -5,7 +5,7 @@
import './augmented.js';
/** This import should appear as-in in the ouput (cjs without asserts) */
import testJson from '@pezkuwi/dev/rootJs/testJson.json' assert { type: 'json' };
import testJson from '@pezkuwi/dev/rootJs/testJson.json' with { type: 'json' };
/** Double double work, i.e. re-exports */
export { Clazz } from './Clazz.js';