mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-27 13:40:47 +00:00
Move SignalProtocolStore to TypeScript
This commit is contained in:
committed by
Josh Perez
parent
5de4babc0d
commit
7e629edd21
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({}));
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user