Move to protobufjs in ts/groups.ts

This commit is contained in:
Fedor Indutny 2021-06-22 07:46:42 -07:00 committed by GitHub
parent 972a4cba0c
commit 9f0c630574
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
30 changed files with 1424 additions and 964 deletions

View file

@ -3,16 +3,30 @@
import * as chai from 'chai';
import { assert } from '../../util/assert';
import { assert, strictAssert } from '../../util/assert';
describe('assert', () => {
it('does nothing if the assertion passes', () => {
assert(true, 'foo bar');
describe('assert utilities', () => {
describe('assert', () => {
it('does nothing if the assertion passes', () => {
assert(true, 'foo bar');
});
it("throws if the assertion fails, because we're in a test environment", () => {
chai.assert.throws(() => {
assert(false, 'foo bar');
}, 'foo bar');
});
});
it("throws because we're in a test environment", () => {
chai.assert.throws(() => {
assert(false, 'foo bar');
}, 'foo bar');
describe('strictAssert', () => {
it('does nothing if the assertion passes', () => {
strictAssert(true, 'foo bar');
});
it('throws if the assertion fails', () => {
chai.assert.throws(() => {
strictAssert(false, 'foo bar');
}, 'foo bar');
});
});
});