Skip to content

Commit

Permalink
fix: Test.run types
Browse files Browse the repository at this point in the history
  • Loading branch information
ValeriaVG committed Oct 28, 2021
1 parent c789755 commit ada2ff7
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
6 changes: 1 addition & 5 deletions dist/Test.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,7 @@ export default class Test {
constructor(title?: string);
it: (title: string, fn?: Function) => void;
xit: (title: string, _fn?: Function) => void;
run: () => Promise<TestResult[] | {
title: string;
error: any;
passed: boolean;
}[]>;
run: () => Promise<TestResult[]>;
before: (fn: FixtureFn) => void;
after: (fn: FixtureFn) => void;
}
2 changes: 1 addition & 1 deletion dist/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export class Test {
xit = (title: string, _fn?: Function) => {
this.suite.push({ title });
};
run = async () => {
run = async (): Promise<TestResult[]> => {
this.results = [];
try {
await Promise.all(this._before.map((fn) => fn()));
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tiny-jest",
"version": "1.1.1",
"version": "1.1.2",
"description": "Minimalistic zero dependency Jest-like test library to run tests in browser, nodejs or deno.",
"keywords": [
"jest",
Expand Down
2 changes: 1 addition & 1 deletion src/Test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default class Test {
xit = (title: string, _fn?: Function) => {
this.suite.push({ title });
};
run = async () => {
run = async (): Promise<TestResult[]> => {
this.results = [];
try {
await Promise.all(this._before.map((fn) => fn()));
Expand Down

0 comments on commit ada2ff7

Please sign in to comment.