Skip to content

Commit

Permalink
Go
Browse files Browse the repository at this point in the history
  • Loading branch information
ardatan committed Oct 25, 2023
1 parent 02f0516 commit 9216b5c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- if: matrix.node-version > 21
- if: matrix.node-version > 20
name: Remove node-libcurl and uWS
run: node scripts/remove-node-libcurl-uws.js
- name: Setup env
Expand Down
16 changes: 12 additions & 4 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,17 @@ const TSCONFIG = resolve(ROOT_DIR, 'tsconfig.json');
const tsconfig = require(TSCONFIG);
const ESM_PACKAGES = [];

let globals = {};

try {
globals = {
uwsUtils: require('./uwsUtils'),
libcurl: require('node-libcurl'),
};
} catch (err) {
console.warn(err);
}

module.exports = {
testEnvironment: 'node',
rootDir: ROOT_DIR,
Expand All @@ -23,10 +34,7 @@ module.exports = {
'^.+\\.js$': 'babel-jest',
},
collectCoverage: false,
globals: {
uwsUtils: require('./uwsUtils'),
libcurl: require('node-libcurl'),
},
globals,
cacheDirectory: resolve(ROOT_DIR, `${CI ? '' : 'node_modules/'}.cache/jest`),
resolver: 'bob-the-bundler/jest-resolver',
};

0 comments on commit 9216b5c

Please sign in to comment.