Skip to content

Commit

Permalink
chore: update ci
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Dec 26, 2023
1 parent 449c33f commit 88482b3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,12 @@ jobs:
- name: Install Webpack 4
run: pnpm i webpack@4
if: ${{ matrix.node == 16 }}
env:
IS_WEBPACK_4: 'true'

- name: Test with Webpack 4
run: pnpm run test
if: ${{ matrix.node == 16 }}
env:
IS_WEBPACK_4: 'true'
SKIP_RSPACK: 'true'
3 changes: 2 additions & 1 deletion test/unit-tests/resolve-id/resolve-id.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ function createResolveIdHook(): Mock {
}

function checkResolveIdHook(resolveIdCallback: Mock): void {
expect.assertions(4 * (1 + propsToTest.length * 2))
if (!process.env.IS_WEBPACK_4) // Webpack 4 has different set of assertions
expect.assertions(4 * (1 + propsToTest.length * 2))

expect(resolveIdCallback).toHaveBeenCalledWith(
expect.stringMatching(/(?:\/|\\)entry\.js$/),
Expand Down

0 comments on commit 88482b3

Please sign in to comment.