Skip to content

Commit ada2ff7

Browse files
committedOct 28, 2021
fix: Test.run types
1 parent c789755 commit ada2ff7

File tree

4 files changed

+4
-8
lines changed

4 files changed

+4
-8
lines changed
 

‎dist/Test.d.ts

+1-5
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,7 @@ export default class Test {
1717
constructor(title?: string);
1818
it: (title: string, fn?: Function) => void;
1919
xit: (title: string, _fn?: Function) => void;
20-
run: () => Promise<TestResult[] | {
21-
title: string;
22-
error: any;
23-
passed: boolean;
24-
}[]>;
20+
run: () => Promise<TestResult[]>;
2521
before: (fn: FixtureFn) => void;
2622
after: (fn: FixtureFn) => void;
2723
}

‎dist/mod.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export class Test {
2222
xit = (title: string, _fn?: Function) => {
2323
this.suite.push({ title });
2424
};
25-
run = async () => {
25+
run = async (): Promise<TestResult[]> => {
2626
this.results = [];
2727
try {
2828
await Promise.all(this._before.map((fn) => fn()));

‎package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "tiny-jest",
3-
"version": "1.1.1",
3+
"version": "1.1.2",
44
"description": "Minimalistic zero dependency Jest-like test library to run tests in browser, nodejs or deno.",
55
"keywords": [
66
"jest",

‎src/Test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export default class Test {
2222
xit = (title: string, _fn?: Function) => {
2323
this.suite.push({ title });
2424
};
25-
run = async () => {
25+
run = async (): Promise<TestResult[]> => {
2626
this.results = [];
2727
try {
2828
await Promise.all(this._before.map((fn) => fn()));

0 commit comments

Comments
 (0)