Skip to content

Commit

Permalink
fix failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
zaidarain1 committed Oct 16, 2024
1 parent 3cec2c0 commit 8c5b474
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion packages/checkout/sdk/src/widgets/load.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(() => {
Expand Down

0 comments on commit 8c5b474

Please sign in to comment.