Skip to content

Commit

Permalink
ci: run only node 18 tests on node 18
Browse files Browse the repository at this point in the history
  • Loading branch information
sagivoululumigo committed May 23, 2024
1 parent bb5af0d commit 80358aa
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/hooks/fetch.test.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
/*
* @group node18
*/
describe('fetch', () => {
test('beforeFetch', async () => {
// @ts-ignore
const response = await fetch('https://example.com/');
const [nodeVersionMajor] = process.versions.node.split('.').map(Number);
if (nodeVersionMajor >= 18) {
describe('fetch', () => {
test('beforeFetch', async () => {
// @ts-ignore
const response = await fetch('https://example.com/');

expect(response.status).toBe(200);
expect(response.status).toBe(200);
});
});
});
}

0 comments on commit 80358aa

Please sign in to comment.