Move SignalProtocolStore to TypeScript
This commit is contained in:
parent
5de4babc0d
commit
7e629edd21
14 changed files with 1291 additions and 1066 deletions
24
ts/test-both/util/isNotNil_test.ts
Normal file
24
ts/test-both/util/isNotNil_test.ts
Normal file
|
@ -0,0 +1,24 @@
|
|||
// Copyright 2021 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import { assert } from 'chai';
|
||||
|
||||
import { isNotNil } from '../../util/isNotNil';
|
||||
|
||||
describe('isNotNil', () => {
|
||||
it('returns false if provided null value', () => {
|
||||
assert.isFalse(isNotNil(null));
|
||||
});
|
||||
|
||||
it('returns false is provided undefined value', () => {
|
||||
assert.isFalse(isNotNil(undefined));
|
||||
});
|
||||
|
||||
it('returns false is provided any other value', () => {
|
||||
assert.isTrue(isNotNil(0));
|
||||
assert.isTrue(isNotNil(4));
|
||||
assert.isTrue(isNotNil(''));
|
||||
assert.isTrue(isNotNil('string value'));
|
||||
assert.isTrue(isNotNil({}));
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue