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

build(sdk): replaces tsdx with dts-cli #22

Merged
merged 7 commits into from
Nov 28, 2023
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
style(sdk): applies prettier formatting
mathewmeconry committed Nov 24, 2023

Unverified

No user is associated with the committer email.
commit 064e8644bb2ac2722b753efbb40f19270e42c5e8
8 changes: 6 additions & 2 deletions sdk/test/unit/promises.test.ts
Original file line number Diff line number Diff line change
@@ -41,14 +41,18 @@ describe('Test promise helpers', () => {
describe('promiseWithTimeout', () => {
it('Should timeout', async () => {
const timeout = 100;
const promise = new Promise(resolve => setTimeout(resolve, timeout * 2).unref());
const promise = new Promise(resolve =>
setTimeout(resolve, timeout * 2).unref()
);
await expect(promiseWithTimeout(promise, timeout)).rejects.toThrow(
'Time out'
);
});
it('Should not timeout', async () => {
const timeout = 100;
const promise = new Promise(resolve => setTimeout(resolve, timeout / 2).unref());
const promise = new Promise(resolve =>
setTimeout(resolve, timeout / 2).unref()
);
await expect(
promiseWithTimeout(promise, timeout)
).resolves.toBeUndefined();