mirror of
https://gitlab.com/timvisee/send.git
synced 2025-12-06 14:10:53 +03:00
sw
This commit is contained in:
@@ -13,7 +13,7 @@ describe('API', function() {
|
||||
describe('websocket upload', function() {
|
||||
it('returns file info on success', async function() {
|
||||
const keychain = new Keychain();
|
||||
const enc = keychain.encryptStream(plaintext);
|
||||
const enc = await keychain.encryptStream(plaintext);
|
||||
const meta = await keychain.encryptMetadata(metadata);
|
||||
const verifierB64 = await keychain.authKeyB64();
|
||||
const p = function() {};
|
||||
@@ -22,12 +22,12 @@ describe('API', function() {
|
||||
const result = await up.result;
|
||||
assert.ok(result.url);
|
||||
assert.ok(result.id);
|
||||
assert.ok(result.ownerToken);
|
||||
assert.ok(result.ownerToken);
|
||||
});
|
||||
|
||||
it('can be cancelled', async function() {
|
||||
const keychain = new Keychain();
|
||||
const enc = keychain.encryptStream(plaintext);
|
||||
const enc = await keychain.encryptStream(plaintext);
|
||||
const meta = await keychain.encryptMetadata(metadata);
|
||||
const verifierB64 = await keychain.authKeyB64();
|
||||
const p = function() {};
|
||||
|
||||
@@ -31,7 +31,8 @@ describe('Streaming', function() {
|
||||
const blob = new Blob([str], { type: 'text/plain' });
|
||||
|
||||
it('can encrypt', async function() {
|
||||
const encStream = new ECE(blob, key, 'encrypt', rs, salt).stream;
|
||||
const ece = new ECE(blob, key, 'encrypt', rs, salt);
|
||||
const encStream = await ece.transform();
|
||||
const reader = encStream.getReader();
|
||||
|
||||
let result = Buffer.from([]);
|
||||
@@ -47,7 +48,8 @@ describe('Streaming', function() {
|
||||
|
||||
it('can decrypt', async function() {
|
||||
const encBlob = new Blob([encrypted]);
|
||||
const decStream = await new ECE(encBlob, key, 'decrypt', rs).stream;
|
||||
const ece = new ECE(encBlob, key, 'decrypt', rs);
|
||||
const decStream = await ece.transform()
|
||||
|
||||
const reader = decStream.getReader();
|
||||
let result = Buffer.from([]);
|
||||
|
||||
Reference in New Issue
Block a user