mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-24 02:58:09 +01:00
18 lines
421 B
JavaScript
18 lines
421 B
JavaScript
|
var encryptor = require('../../../app/scripts/lib/encryptor')
|
||
|
|
||
|
QUnit.test('encryptor', function(assert) {
|
||
|
var password, data, encrypted
|
||
|
|
||
|
password = 'a sample passw0rd'
|
||
|
data = { foo: 'data to encrypt' }
|
||
|
|
||
|
encryptor.encrypt(password, data)
|
||
|
.then(function(result) {
|
||
|
assert.equal(typeof result, 'string', 'returns a string')
|
||
|
})
|
||
|
.catch(function(reason) {
|
||
|
assert.ifError(reason, 'threw an error')
|
||
|
})
|
||
|
|
||
|
})
|