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:
Kurdistan Tech Ministry committed 2026-01-17 21:02:45 +03:00
1 parent cb6801a3cc
commit b65f265e87
9 files changed
+2987 -2672

No files matched your search

+3 -5
View File
@@ -6,7 +6,7 @@
import type { expect } from './env/expect.js';
import type { jest } from './env/jest.js';
import type { lifecycle } from './env/lifecycle.js';
import type { suite } from './env/suite.js';
import type { Describe, It } from './env/suite.js';
type Expect = ReturnType<typeof expect>;
@@ -14,8 +14,6 @@ type Jest = ReturnType<typeof jest>;
type Lifecycle = ReturnType<typeof lifecycle>;
type Suite = ReturnType<typeof suite>;
declare global {
var after: Lifecycle['after'];
var afterAll: Lifecycle['afterAll'];
@@ -23,9 +21,9 @@ declare global {
var before: Lifecycle['before'];
var beforeAll: Lifecycle['beforeAll'];
var beforeEach: Lifecycle['beforeEach'];
var describe: Suite['describe'];
var describe: Describe;
var expect: Expect['expect'];
var it: Suite['it'];
var it: It;
var jest: Jest['jest'];
}