Skip to content

Commit

Permalink
checker for order
Browse files Browse the repository at this point in the history
  • Loading branch information
anny1021 committed Jan 18, 2024
1 parent 7bd45a4 commit cc612dd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import order from '../../../../testUtils/mockApi/order';
describe('sqle/order/hooks/useAllowAuditLevel', () => {
const customRender = () => {
return renderHook(() => useAllowAuditLevel());
}
};

let requestGetWorkflowTemplate: jest.SpyInstance;

Expand All @@ -30,7 +30,7 @@ describe('sqle/order/hooks/useAllowAuditLevel', () => {
expect(result.current.disabledOperatorOrderBtnTips).toBe('');
await act(async () => {
result.current.setDisabledOperatorOrderBtnTips('text');
})
});
expect(result.current.disabledOperatorOrderBtnTips).toBe('text');

await act(async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ const auditResultData = [
];

describe('sqle/order/hooks/useAuditResultRuleInfo', () => {

let requestGetRuleList: jest.SpyInstance;

beforeEach(() => {
Expand All @@ -32,7 +31,9 @@ describe('sqle/order/hooks/useAuditResultRuleInfo', () => {
});

it('render when auditResult', async () => {
const { result } = renderHook(() => useAuditResultRuleInfo(auditResultData));
const { result } = renderHook(() =>
useAuditResultRuleInfo(auditResultData)
);
await act(async () => jest.advanceTimersByTime(3300));
expect(requestGetRuleList).toBeCalled();
expect(requestGetRuleList).toBeCalledWith({
Expand Down

0 comments on commit cc612dd

Please sign in to comment.