jest.mock('@react-native-firebase/auth', () => ({
__esModule: true,
default: jest.fn(),
}))
jest.mock('@invertase/react-native-apple-authentication', () => ({
__esModule: true,
default: jest.fn(),
}))
jest.mock('@react-native-google-signin/google-signin', () => ({
__esModule: true,
default: jest.fn(),
}))
jest.mock('react-native-fbsdk-next', () => ({
__esModule: true,
default: jest.fn(),
}))
import { onDetectFields } from '@/common/hooks/useParseExpression/helper'
import { EExpressionFields } from '@/common/hooks/useParseExpression/types'
import { ERoom, TRoomOptions } from '@/store/modules/calculator/types'
describe('onDetectFields', () => {
const rooms: TRoomOptions[] = [
{
id: '1',
type: ERoom.bathroom,
area: '10',
walls: '20',
length: '5',
width: '3',
height: '8',
},
{
id: '2',
type: ERoom.bedroom,
area: '15',
walls: '25',
length: '6',
width: '4',
height: '7',
},
]
it('should return correct result for bathroom area', () => {
expect(onDetectFields(EExpressionFields.bathroomArea, rooms)).toBe(10)
})
it('should return correct result for bathroom walls', () => {
expect(onDetectFields(EExpressionFields.bathroomWalls, rooms)).toBe(20)
})
})
Какие импорты в трех файлах импортированных в этом? (сам код не нужен, только импорты)
Gena
Слава
Vitaliy
Эдвард
Alex
Alex
Danila
Nikita