Skip to content

Commit

Permalink
chore(test): Remove windows-specific prepare-install (#432)
Browse files Browse the repository at this point in the history
There's a need to skip some integration tests for Windows, this PR moves
the logic for skipping to the test setup itself rather than altering the
tests and dependencies as we were doing in the `prepare-install` step.
The pre-install logic was also deleting the `package-lock.json`, I'm not
100% clear on what the purpose was, but seems like it may have been done
accidentally given the context of the [diff
here](#372 (comment)).

With the previous logic, CI started to fail on Windows because the
`package-lock.json` was removed before install, causing us to install a
later version of dependency. Instead of removing that line of code in
the `prepare-install` file, just trying this approach which feels a
little more straightforward.

---------

Co-authored-by: Nathan Rajlich <[email protected]>
  • Loading branch information
jeffsee55 and TooTallNate authored Jul 3, 2024
1 parent bd68351 commit 31ab417
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 25 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ jobs:
with:
# we lock to 3.11 for a distutils requirement for node-gyp
python-version: '3.11'
- name: Prepare Install (if applicable)
run: node prepare-install.js
- name: Enable Corepack
run: corepack enable npm
- name: Install Dependencies
Expand Down
22 changes: 0 additions & 22 deletions prepare-install.js

This file was deleted.

21 changes: 20 additions & 1 deletion test/integration.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,26 @@ jest.setTimeout(200_000);

const integrationDir = `${__dirname}${path.sep}integration`;

for (const integrationTest of readdirSync(integrationDir)) {
const integrationTests = readdirSync(integrationDir);
const filteredTestsToRun = integrationTests.filter((testName) => {
const isWin = process.platform === 'win32';
// Filter the integration tests that will never work in Windows
if (
isWin &&
[
'argon2.js',
'highlights.js',
'hot-shots.js',
'loopback.js',
'playwright-core.js',
].includes(testName)
) {
return false;
}
return true;
});

for (const integrationTest of filteredTestsToRun) {
let currentIntegrationDir = integrationDir;

it(`should correctly trace and correctly execute ${integrationTest}`, async () => {
Expand Down

0 comments on commit 31ab417

Please sign in to comment.