@@ -1239,60 +1239,62 @@ describe('OIDCConfig', () => {
1239
1239
} ) ;
1240
1240
} ) ;
1241
1241
} ) ;
1242
- describe ( 'PasswordPolicyAuthConfig' , ( ) => {
1243
- describe ( 'constructor' , ( ) => {
1244
- const validConfig = new PasswordPolicyAuthConfig ( {
1245
- passwordPolicyEnforcementState : 'ENFORCE' ,
1242
+ } ) ;
1243
+
1244
+ describe ( 'PasswordPolicyAuthConfig' , ( ) => {
1245
+ describe ( 'constructor' , ( ) => {
1246
+ const validConfig = new PasswordPolicyAuthConfig ( {
1247
+ passwordPolicyEnforcementState : 'ENFORCE' ,
1248
+ passwordPolicyVersions : [
1249
+ {
1250
+ customStrengthOptions : {
1251
+ containsNumericCharacter : true ,
1252
+ containsLowercaseCharacter : true ,
1253
+ containsNonAlphanumericCharacter : true ,
1254
+ containsUppercaseCharacter : true ,
1255
+ minPasswordLength : 8 ,
1256
+ maxPasswordLength : 30 ,
1257
+ } ,
1258
+ } ,
1259
+ ] ,
1260
+ forceUpgradeOnSignin : true ,
1261
+ } ) ;
1262
+
1263
+ it ( 'should throw an error on missing state' , ( ) => {
1264
+ expect ( ( ) => new PasswordPolicyAuthConfig ( {
1246
1265
passwordPolicyVersions : [
1247
1266
{
1248
- customStrengthOptions : {
1249
- containsNumericCharacter : true ,
1250
- containsLowercaseCharacter : true ,
1251
- containsNonAlphanumericCharacter : true ,
1252
- containsUppercaseCharacter : true ,
1253
- minPasswordLength : 8 ,
1254
- maxPasswordLength : 30 ,
1255
- } ,
1256
- } ,
1267
+ customStrengthOptions : { } ,
1268
+ }
1257
1269
] ,
1258
- forceUpgradeOnSignin : true ,
1259
- } ) ;
1260
-
1261
- it ( 'should throw an error on missing state' , ( ) => {
1262
- expect ( ( ) => new PasswordPolicyAuthConfig ( {
1263
- passwordPolicyVersions : [
1264
- {
1265
- customStrengthOptions : { } ,
1266
- }
1267
- ] ,
1268
- } as any ) ) . to . throw ( 'INTERNAL ASSERT FAILED: Invalid password policy configuration response' ) ;
1269
- } ) ;
1270
+ } as any ) ) . to . throw ( 'INTERNAL ASSERT FAILED: Invalid password policy configuration response' ) ;
1271
+ } ) ;
1270
1272
1271
- it ( 'should set readonly property "enforcementState" to ENFORCE on state enforced' , ( ) => {
1272
- expect ( validConfig . enforcementState ) . to . equal ( 'ENFORCE' ) ;
1273
- } ) ;
1273
+ it ( 'should set readonly property "enforcementState" to ENFORCE on state enforced' , ( ) => {
1274
+ expect ( validConfig . enforcementState ) . to . equal ( 'ENFORCE' ) ;
1275
+ } ) ;
1274
1276
1275
- it ( 'should set readonly property "enforcementState" to OFF on state disabling' , ( ) => {
1276
- const offStateConfig = new PasswordPolicyAuthConfig ( {
1277
- passwordPolicyEnforcementState : 'OFF' ,
1278
- } ) ;
1279
- expect ( offStateConfig . enforcementState ) . to . equal ( 'OFF' ) ;
1277
+ it ( 'should set readonly property "enforcementState" to OFF on state disabling' , ( ) => {
1278
+ const offStateConfig = new PasswordPolicyAuthConfig ( {
1279
+ passwordPolicyEnforcementState : 'OFF' ,
1280
1280
} ) ;
1281
+ expect ( offStateConfig . enforcementState ) . to . equal ( 'OFF' ) ;
1282
+ } ) ;
1281
1283
1282
- it ( 'should set readonly property "constraints"' , ( ) => {
1283
- const expectedConstraints : CustomStrengthOptionsConfig = {
1284
- requireUppercase : true ,
1285
- requireLowercase : true ,
1286
- requireNonAlphanumeric : true ,
1287
- requireNumeric : true ,
1288
- minLength : 8 ,
1289
- maxLength : 30 ,
1290
- }
1291
- expect ( validConfig . constraints ) . to . deep . equal ( expectedConstraints ) ;
1292
- } ) ;
1284
+ it ( 'should set readonly property "constraints"' , ( ) => {
1285
+ const expectedConstraints : CustomStrengthOptionsConfig = {
1286
+ requireUppercase : true ,
1287
+ requireLowercase : true ,
1288
+ requireNonAlphanumeric : true ,
1289
+ requireNumeric : true ,
1290
+ minLength : 8 ,
1291
+ maxLength : 30 ,
1292
+ }
1293
+ expect ( validConfig . constraints ) . to . deep . equal ( expectedConstraints ) ;
1294
+ } ) ;
1293
1295
1294
- it ( 'should set readonly property "forceUpgradeOnSignin"' , ( ) => {
1295
- expect ( validConfig . forceUpgradeOnSignin ) . to . deep . equal ( true ) ;
1296
- } ) ;
1296
+ it ( 'should set readonly property "forceUpgradeOnSignin"' , ( ) => {
1297
+ expect ( validConfig . forceUpgradeOnSignin ) . to . deep . equal ( true ) ;
1297
1298
} ) ;
1298
- } ) ; } ) ;
1299
+ } ) ;
1300
+ } ) ;
0 commit comments