Timeline: repair oldest/newest metrics if we fetch nothing
This commit is contained in:
parent
56ae4a41eb
commit
6832b8acca
47 changed files with 579 additions and 173 deletions
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);
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue