@@ -79,12 +79,12 @@ describe("PersistenceManager", () => {
79
79
expect ( persistenceManager . checkEncryptionKey ( validEncryptionKey ) ) . toBe ( false ) ;
80
80
} ) ;
81
81
82
- test ( "should return false if loaded but password is wrong" , async ( ) => {
82
+ test ( "should return false if loaded but encryption key is wrong" , async ( ) => {
83
83
await persistenceManager . load ( validEncryptionKey ) ;
84
84
expect ( persistenceManager . checkEncryptionKey ( invalidEncryptionKey ) ) . toBe ( false ) ;
85
85
} ) ;
86
86
87
- test ( "should return true if loaded and password is correct" , async ( ) => {
87
+ test ( "should return true if loaded and encryption key is correct" , async ( ) => {
88
88
await persistenceManager . load ( validEncryptionKey ) ;
89
89
expect ( persistenceManager . checkEncryptionKey ( validEncryptionKey ) ) . toBe ( true ) ;
90
90
} ) ;
@@ -97,14 +97,14 @@ describe("PersistenceManager", () => {
97
97
98
98
test ( "should return false if load was called but failed" , async ( ) => {
99
99
encryptedDataReplicant . value = generateEncryptedConfig ( ) ;
100
- const res = await persistenceManager . load ( invalidEncryptionKey ) ; // Will fail because the password is invalid
100
+ const res = await persistenceManager . load ( invalidEncryptionKey ) ; // Will fail because the encryption key is invalid
101
101
expect ( res . failed ) . toBe ( true ) ;
102
102
expect ( persistenceManager . isLoaded ( ) ) . toBe ( false ) ;
103
103
} ) ;
104
104
105
105
test ( "should return true if load was called and succeeded" , async ( ) => {
106
106
encryptedDataReplicant . value = generateEncryptedConfig ( ) ;
107
- const res = await persistenceManager . load ( validEncryptionKey ) ; // password is correct, should work
107
+ const res = await persistenceManager . load ( validEncryptionKey ) ; // encryption key is correct, should work
108
108
expect ( res . failed ) . toBe ( false ) ;
109
109
expect ( persistenceManager . isLoaded ( ) ) . toBe ( true ) ;
110
110
} ) ;
@@ -143,15 +143,15 @@ describe("PersistenceManager", () => {
143
143
expect ( encryptedDataReplicant . value . cipherText ) . toBeDefined ( ) ;
144
144
} ) ;
145
145
146
- test ( "should error if password is wrong" , async ( ) => {
146
+ test ( "should error if encryption key is wrong" , async ( ) => {
147
147
const res = await persistenceManager . load ( invalidEncryptionKey ) ;
148
148
expect ( res . failed ) . toBe ( true ) ;
149
149
if ( res . failed ) {
150
150
expect ( res . errorMessage ) . toContain ( "Password isn't correct" ) ;
151
151
}
152
152
} ) ;
153
153
154
- test ( "should succeed if password is correct" , async ( ) => {
154
+ test ( "should succeed if encryption key is correct" , async ( ) => {
155
155
const res = await persistenceManager . load ( validEncryptionKey ) ;
156
156
expect ( res . failed ) . toBe ( false ) ;
157
157
} ) ;
@@ -402,7 +402,7 @@ describe("PersistenceManager", () => {
402
402
} ) ;
403
403
404
404
test ( "should automatically save if BundleManager or InstanceManager emit a change event" , async ( ) => {
405
- await persistenceManager . load ( validEncryptionKey ) ; // Set password so that we can save stuff
405
+ await persistenceManager . load ( validEncryptionKey ) ; // Set encryption key so that we can save stuff
406
406
407
407
encryptedDataReplicant . value . cipherText = undefined ;
408
408
bundleManager . emit ( "change" ) ;
0 commit comments