Skip to content

Commit

Permalink
test: 💍 run FsaNodeFs tests only under Node 20
Browse files Browse the repository at this point in the history
  • Loading branch information
streamich committed Jun 18, 2023
1 parent 0379561 commit bd22f12
Show file tree
Hide file tree
Showing 8 changed files with 638 additions and 634 deletions.
8 changes: 8 additions & 0 deletions src/__tests__/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,11 @@ export const tryGetChild = (link: Link, name: string): Link => {
};

export const tryGetChildNode = (link: Link, name: string): Node => tryGetChild(link, name).getNode();

const nodeMajorVersion = +process.version.split('.')[0].slice(1);

/**
* The `File` global is available only starting in Node v20. Hence we run the
* tests only in those versions.
*/
export const onlyOnNode20 = nodeMajorVersion >= 20 ? describe : describe.skip;
Loading

0 comments on commit bd22f12

Please sign in to comment.