Skip to content

Commit

Permalink
feat: updated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ngyewch committed Jul 5, 2024
1 parent 4a28766 commit 2ccb158
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/test/js/spec/DecoderStreamSpec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@ import {DecoderStream} from '../../../main/js/decoderStream.js';
import {InputStream} from '../../../main/js/inputStream.js';
import {approx} from './utils.js';

t.test('simple operations', t => {
const decoderStream = newDecoderStream([0x80]);

t.notOk(decoderStream.isEof());
t.equal(decoderStream.peek(), 0x80);
t.notOk(decoderStream.isEof());
t.equal(decoderStream.read(), 0x80);
t.ok(decoderStream.isEof());

t.end();
});

t.test('should decode unsigned Vint values', t => {
{
const decoderStream = newDecoderStream([0x80]);
Expand Down

0 comments on commit 2ccb158

Please sign in to comment.