Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typo for type definition of completed #3

Merged
merged 2 commits into from
Dec 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading