chore(kboot): add more logging (#1004)
This commit is contained in:
committed by
László Monda
parent
db2e14a852
commit
4d2d6d40fb
13
packages/kboot/test/util/usb/decode-command-response.spec.ts
Normal file
13
packages/kboot/test/util/usb/decode-command-response.spec.ts
Normal 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);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user