Skip to content

Commit

Permalink
chore: fix npm script, add error in test to check
Browse files Browse the repository at this point in the history
  • Loading branch information
heorhi-deriv committed Nov 21, 2024
1 parent 2eda1f8 commit e7a7b42
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
"test": "f () { npm run test:stylelint && npm run test:eslint-all && npm run test:jest ;}; f",
"test:stylelint": "stylelint \"./packages/*/src/**/*.s(a|c)ss\"",
"test:ci": "f () { npm run test:stylelint && npm run test:eslint-all ;}; f",
"test:shard": "jest --all --shard=${SHARD_INDEX}/${SHARD_COUNT} --maxWorkers=${JEST_MAX_WORKERS:-'50%'} --coverage",
"test:shard": "jest --all --shard=${SHARD_INDEX}/${SHARD_COUNT} --maxWorkers=${JEST_MAX_WORKERS:-'50%'}",
"test:jest": "jest --all --maxWorkers=${JEST_MAX_WORKERS:-'50%'}",
"test:performance": "cd e2e-tests && jest -c ./jest.config.js --detectOpenHandles performance",
"stylelint:fix": "stylelint \"./packages/*/src/**/*.s(a|c)ss\" --fix",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import React from 'react';
import { render, screen, waitFor } from '@testing-library/react';
import { Router } from 'react-router';
import { useCashierLocked, useTradingPlatformStatus } from '@deriv/hooks';
import { createBrowserHistory } from 'history';
import AccountTransfer from '../account-transfer';
import CashierProviders from '../../../cashier-providers';

import { useCashierLocked, useTradingPlatformStatus } from '@deriv/hooks';
import { mockStore } from '@deriv/stores';
import { render, screen, waitFor } from '@testing-library/react';

import CashierProviders from '../../../cashier-providers';
import AccountTransfer from '../account-transfer';

jest.mock('@deriv/shared/src/services/ws-methods', () => ({
__esModule: true,
Expand Down Expand Up @@ -112,7 +114,7 @@ describe('<AccountTransfer />', () => {
mockRootStore.modules.cashier.account_transfer.is_transfer_locked = true;
renderAccountTransfer();

expect(await screen.findByText('Transfers are locked')).toBeInTheDocument();
expect(await screen.findByText('Transfers are locked!')).toBeInTheDocument();
});

it('renders the error component if there are errors when transferring between accounts', async () => {
Expand Down

0 comments on commit e7a7b42

Please sign in to comment.