1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-24 02:58:09 +01:00
metamask-extension/test/integration/lib/encryptor-test.js

18 lines
421 B
JavaScript
Raw Normal View History

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')
})
})