1import { Platform } from 'expo-modules-core';
2
3import ExpoFaceDetector from '../ExpoFaceDetector';
4import * as FaceDetector from '../FaceDetector';
5
6describe('detectFacesAsync', () => {
7  it(`merges props`, async () => {
8    const uri = '<DEBUG_URI>';
9    const options = {};
10    try {
11      await FaceDetector.detectFacesAsync(uri, options);
12      expect(ExpoFaceDetector.detectFaces).toHaveBeenLastCalledWith({ ...options, uri });
13    } catch (e) {
14      if (Platform.OS === 'web') {
15        expect(e.code).toBe('ERR_UNAVAILABLE');
16      }
17    }
18  });
19});
20