Skip to content

Commit ae9671b

Browse files
committed
chore: removed unnecessary codes from liveness test code
1 parent 2ec7e77 commit ae9671b

File tree

2 files changed

+2
-22
lines changed

2 files changed

+2
-22
lines changed

packages/react-liveness/src/components/FaceLivenessDetector/LivenessCheck/__tests__/LivenessCameraModule.test.tsx

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,7 @@
11
import * as React from 'react';
2-
import {
3-
screen,
4-
waitFor,
5-
fireEvent,
6-
act,
7-
render,
8-
} from '@testing-library/react';
2+
import { screen, waitFor } from '@testing-library/react';
93
import { when, resetAllWhenMocks } from 'jest-when';
104
import { LivenessClassNames } from '../../types/classNames';
11-
import { mockVideoMediaStream } from '../../service/utils/__mocks__/testUtils';
125
import {
136
renderWithLivenessProvider,
147
getMockedFunction,
@@ -34,7 +27,6 @@ import { FaceMatchState } from '../../service';
3427
import * as Device from '../../utils/device';
3528
import { getDisplayText } from '../../utils/getDisplayText';
3629
import { selectIsRecordingStopped } from '../LivenessCheck';
37-
import { selectErrorState } from '../../shared';
3830

3931
jest.mock('../../hooks');
4032
jest.mock('../../hooks/useLivenessSelector');
@@ -80,18 +72,6 @@ describe('LivenessCameraModule', () => {
8072
} = getDisplayText(undefined);
8173
const { cancelLivenessCheckText, recordingIndicatorText } = streamDisplayText;
8274

83-
const mockVideoConstraints = {
84-
width: { ideal: 1280 },
85-
height: { ideal: 720 },
86-
facingMode: 'user',
87-
};
88-
89-
const mockSelectableDevices = [
90-
{ deviceId: 'device-1', label: 'Camera 1' },
91-
{ deviceId: 'device-2', label: 'Camera 2' },
92-
{ deviceId: 'device-3', label: 'Camera 3' },
93-
];
94-
9575
const mockMediaStream = {
9676
getTracks: jest.fn(() => []),
9777
getVideoTracks: jest.fn(() => []),

packages/react-liveness/src/components/FaceLivenessDetector/service/machine/__tests__/machine.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { interpret } from 'xstate';
22
import { setImmediate } from 'timers';
3-
import { when, resetAllWhenMocks } from 'jest-when';
3+
import { resetAllWhenMocks } from 'jest-when';
44

55
import {
66
FaceLivenessDetectorProps,

0 commit comments

Comments
 (0)