Skip to content

Commit

Permalink
Fix typo for type definition of completed (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
sosukesuzuki authored Dec 31, 2023
1 parent b6b1278 commit 67f7b00
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ The plan includes all exports from [`node:assert`](https://nodejs.org/api/assert
as well as:

* `end()`: a function to complete the plan
* `complete`: a promise that will resolve when the plan is completed.
* `completed`: a promise that will resolve when the plan is completed.

## License

Expand Down
2 changes: 1 addition & 1 deletion tspl.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export interface Options {
}

export type Plan = Omit<typeof assert, 'CallTracker' | 'AssertionError' | 'strict'> & {
complete: Promise<void>
completed: Promise<void>
end: () => void
}

Expand Down
4 changes: 2 additions & 2 deletions tspl.test-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ test('tspl', (t) => {
expectType<void>(p.end());
});

test('complete', async (t) => {
test('completed', async (t) => {
expectType<Plan>(tspl(t, { plan: 1 }));
const p: Plan = tspl(t, { plan: 1 });

setTimeout(() => {
p.strictEqual(1, 1);
});

await p.complete
await p.completed
});

test('tspl', (t) => {
Expand Down

0 comments on commit 67f7b00

Please sign in to comment.