chore(kboot): add more logging (#1004)

This commit is contained in:
Róbert Kiss
2019-07-30 22:23:38 +02:00
committed by László Monda
parent db2e14a852
commit 4d2d6d40fb
2 changed files with 24 additions and 1 deletions

View File

@@ -0,0 +1,13 @@
import { decodeCommandResponse } from '../../../src/util/usb/decode-command-response';
describe('decodeCommandResponse', () => {
it('should parse the command', () => {
const arr = '03 00 0c 00 a0 00 00 02 00 00 00 00 c1 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
.split(' ');
const buffer = Buffer.from(arr);
const response = decodeCommandResponse(buffer);
expect(response.code).toEqual(0);
expect(response.tag).toEqual(0);
});
});