Skip to content

Commit

Permalink
test: check for abortcontroller before running withAbortSignal test
Browse files Browse the repository at this point in the history
  • Loading branch information
thecodrr committed Jul 31, 2023
1 parent e328dfc commit bdd5261
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions __tests__/fdir.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,9 @@ for (const type of apiTypes) {
}

test(`[async] crawl directory & use abort signal to abort`, async (t) => {
// AbortController is not present on Node v14
if (!("AbortController" in globalThis)) return;

const totalFiles = new fdir().onlyCounts().crawl("node_modules").sync();
const abortController = new AbortController();
const api = new fdir()
Expand Down

0 comments on commit bdd5261

Please sign in to comment.