@@ -42,9 +42,9 @@ describe('SensitiveInfo API - Complete Coverage', () => {
4242 describe ( 'Error Types' , ( ) => {
4343 it ( 'should define all error codes' , ( ) => {
4444 const codes : ErrorCode [ ] = [
45+ ErrorCode . NOT_FOUND ,
4546 ErrorCode . AUTH_FAILED ,
4647 ErrorCode . AUTH_CANCELED ,
47- ErrorCode . AUTH_TIMEOUT ,
4848 ErrorCode . BIOMETRY_LOCKOUT ,
4949 ErrorCode . KEY_INVALIDATED ,
5050 ErrorCode . DECRYPTION_FAILED ,
@@ -53,7 +53,7 @@ describe('SensitiveInfo API - Complete Coverage', () => {
5353 ErrorCode . MIGRATION_FAILED ,
5454 ] ;
5555
56- expect ( codes ) . toHaveLength ( 10 ) ;
56+ expect ( codes ) . toHaveLength ( 9 ) ;
5757 codes . forEach ( ( code ) => {
5858 expect ( code ) . toMatch ( / ^ E _ / ) ;
5959 } ) ;
@@ -81,13 +81,14 @@ describe('SensitiveInfo API - Complete Coverage', () => {
8181 describe ( 'Type Definitions' , ( ) => {
8282 it ( 'should support all AccessControl types' , ( ) => {
8383 const controls : AccessControl [ ] = [
84- 'devicePasscode' ,
85- 'biometryOrDevicePasscode' ,
86- 'biometryAndDevicePasscode' ,
84+ 'secureEnclaveBiometry' ,
8785 'biometryCurrentSet' ,
86+ 'biometryAny' ,
87+ 'devicePasscode' ,
88+ 'none' ,
8889 ] ;
8990
90- expect ( controls ) . toHaveLength ( 4 ) ;
91+ expect ( controls ) . toHaveLength ( 5 ) ;
9192 controls . forEach ( ( control ) => {
9293 expect ( typeof control ) . toBe ( 'string' ) ;
9394 } ) ;
@@ -97,13 +98,12 @@ describe('SensitiveInfo API - Complete Coverage', () => {
9798 const levels : SecurityLevel [ ] = [
9899 'secureEnclave' ,
99100 'strongBox' ,
100- 'hardwareBacked' ,
101- 'biometricProtected' ,
102- 'passcodeProtected' ,
101+ 'biometry' ,
102+ 'deviceCredential' ,
103103 'software' ,
104104 ] ;
105105
106- expect ( levels ) . toHaveLength ( 6 ) ;
106+ expect ( levels ) . toHaveLength ( 5 ) ;
107107 levels . forEach ( ( level ) => {
108108 expect ( typeof level ) . toBe ( 'string' ) ;
109109 } ) ;
@@ -250,8 +250,8 @@ describe('SensitiveInfo API - Complete Coverage', () => {
250250 } ) ;
251251
252252 it ( 'should define default access control level' , ( ) => {
253- const defaultControl = 'biometryOrDevicePasscode ' as AccessControl ;
254- expect ( defaultControl ) . toBe ( 'biometryOrDevicePasscode ' ) ;
253+ const defaultControl = 'secureEnclaveBiometry ' as AccessControl ;
254+ expect ( defaultControl ) . toBe ( 'secureEnclaveBiometry ' ) ;
255255 } ) ;
256256
257257 it ( 'should define keychain service constants' , ( ) => {
@@ -366,7 +366,7 @@ describe('SensitiveInfo API - Complete Coverage', () => {
366366 metadata : {
367367 timestamp : Date . now ( ) ,
368368 securityLevel : 'secureEnclave' as SecurityLevel ,
369- accessControl : 'biometryOrDevicePasscode ' as AccessControl ,
369+ accessControl : 'secureEnclaveBiometry ' as AccessControl ,
370370 migratedFromV5 : false ,
371371 } ,
372372 } ;
@@ -420,15 +420,15 @@ describe('SensitiveInfo API - Complete Coverage', () => {
420420 const code = async ( ) => {
421421 // const secret = await SensitiveInfo.getItem('password', {
422422 // keychainService: 'myapp',
423- // accessControl: 'biometryOrDevicePasscode ',
423+ // accessControl: 'secureEnclaveBiometry ',
424424 // prompt: {
425425 // title: 'Unlock Your Account',
426426 // subtitle: 'Authenticate with Face ID or Touch ID'
427427 // }
428428 // });
429429 return {
430430 keychainService : 'myapp' ,
431- accessControl : 'biometryOrDevicePasscode ' as const ,
431+ accessControl : 'secureEnclaveBiometry ' as const ,
432432 prompt : {
433433 title : 'Unlock Your Account' ,
434434 subtitle : 'Authenticate with Face ID or Touch ID' ,
@@ -438,7 +438,7 @@ describe('SensitiveInfo API - Complete Coverage', () => {
438438
439439 const result = await code ( ) ;
440440 expect ( result . keychainService ) . toBe ( 'myapp' ) ;
441- expect ( result . accessControl ) . toBe ( 'biometryOrDevicePasscode ' ) ;
441+ expect ( result . accessControl ) . toBe ( 'secureEnclaveBiometry ' ) ;
442442 } ) ;
443443
444444 it ( 'Example 3: Detect capabilities' , async ( ) => {
0 commit comments