0
mirror of https://github.com/valentineus/iii-client.git synced 2025-06-04 07:03:34 +03:00

Reduction of exported functions

This commit is contained in:
Valentin Popov 2017-10-10 00:06:27 +04:00
parent 3c2424892e
commit 0e38621d26
2 changed files with 0 additions and 28 deletions

View File

@ -147,10 +147,6 @@ function isString(value) {
}
export {
isVerification,
decryptJSON,
connect,
decrypt,
encrypt,
send
};

View File

@ -2,37 +2,13 @@ import { assert } from 'chai';
import generator from 'uuid';
import {
isVerification,
decryptJSON,
connect,
decrypt,
encrypt,
send
} from './index';
describe('iii-client:', () => {
var uuid = generator.v4();
var text = 'Hello, World!';
var data = JSON.stringify({ text });
it('isVerification()', () => {
assert.isFalse(isVerification(text));
assert.isTrue(isVerification(uuid));
});
it('encrypt()', () => {
assert.notEqual(text, encrypt(text));
});
it('decrypt()', () => {
var encrypted = encrypt(text);
assert.equal(text, decrypt(encrypted));
});
it('decryptJSON()', () => {
var encrypted = encrypt(data);
assert.equal(data, decrypt(encrypted).toString());
});
it('connect()', (done) => {
connect(uuid, (request) => {