mirror of
https://github.com/pezkuwichain/pezkuwi-dev.git
synced 2026-04-22 05:38:01 +00:00
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:
@@ -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';
|
||||
|
||||
@@ -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;
|
||||
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user