Add an assertion when updating conversations; update cleanData

This commit is contained in:
Evan Hahn 2021-02-04 13:54:03 -06:00 committed by GitHub
parent 73a304faba
commit bc37b5c907
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 749 additions and 79 deletions

View file

@ -0,0 +1,18 @@
// Copyright 2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import * as chai from 'chai';
import { assert } from '../../util/assert';
describe('assert', () => {
it('does nothing if the assertion passes', () => {
assert(true, 'foo bar');
});
it("throws because we're in a test environment", () => {
chai.assert.throws(() => {
assert(false, 'foo bar');
}, 'foo bar');
});
});