diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 9d112c42d3..349d71e5c8 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -50,6 +50,8 @@ jobs: mv hashes.json hashes.json.old yarn updateHashes if [ -n "$(git diff --exit-code hashes.json)" ]; then + git config user.name "${{ github.actor }}" + git config user.email "${{ github.actor }}@users.noreply.github.com" git add hashes.json git commit -m "Update hashes.json" git push diff --git a/packages/checkout/sdk/src/widgets/load.test.ts b/packages/checkout/sdk/src/widgets/load.test.ts index 3d16fadcc4..57eb2b8906 100644 --- a/packages/checkout/sdk/src/widgets/load.test.ts +++ b/packages/checkout/sdk/src/widgets/load.test.ts @@ -2,12 +2,15 @@ import { SDK_VERSION_MARKER } from '../env'; import { getWidgetsEsmUrl, loadUnresolvedBundle } from './load'; +const SDK_VERSION = SDK_VERSION_MARKER; + jest.mock('./hashUtils', () => ({ generateSHA512Hash: jest.fn(async () => 'sha512-abc123'), + // eslint-disable-next-line max-len + validatedHashesUrl: jest.fn(async () => `https://raw.githubusercontent.com/immutable/ts-immutable-sdk/refs/tags/${SDK_VERSION}/packages/checkout/widgets-lib/hashes.json`), })); describe('load', () => { - const SDK_VERSION = SDK_VERSION_MARKER; const scriptId = 'immutable-checkout-widgets-bundle'; beforeEach(() => {