Skip to content

Commit

Permalink
test: update test for caching
Browse files Browse the repository at this point in the history
  • Loading branch information
rzvxa committed Jan 2, 2024
1 parent 0e2e3c4 commit 9ae7d87
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/dwait.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,10 @@ describe("dwait Tests", () => {
});

test("should return the same DeferredPromise as long as a reference of that DeferredPromise exists on the heap", async () => {
const dwaitPromise1 = dwait(resolveClass());
const dwaitPromise2 = dwait(resolveClass());
expect(dwaitPromise1).toBe(dwaitPromise1);
const klass = resolveClass();
const dwaitPromise1 = dwait(klass);
const dwaitPromise2 = dwait(klass);
expect(dwaitPromise1).toBe(dwaitPromise2);
});

test("should throw on accessing properties on null or undefined deferred operations", async () => {
Expand Down

0 comments on commit 9ae7d87

Please sign in to comment.