mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 20:26:24 +00:00
Timeline: repair oldest/newest metrics if we fetch nothing
This commit is contained in:
17
ts/test-node/updater/curve_test.ts
Normal file
17
ts/test-node/updater/curve_test.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
// Copyright 2019-2020 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import { assert } from 'chai';
|
||||
|
||||
import { keyPair, sign, verify } from '../../updater/curve';
|
||||
|
||||
describe('updater/curve', () => {
|
||||
it('roundtrips', () => {
|
||||
const message = Buffer.from('message');
|
||||
const { publicKey, privateKey } = keyPair();
|
||||
const signature = sign(privateKey, message);
|
||||
const verified = verify(publicKey, message, signature);
|
||||
|
||||
assert.strictEqual(verified, true);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user