mirror of
https://github.com/yume-chan/ya-webadb.git
synced 2025-10-04 10:19:17 +02:00
feat(struct): new API full rewrite
This commit is contained in:
parent
a29268426d
commit
d50a170ab8
89 changed files with 1487 additions and 5512 deletions
|
@ -51,6 +51,18 @@ async function assertResolves<T>(promise: Promise<T>, expected: T) {
|
|||
return assert.deepStrictEqual(await promise, expected);
|
||||
}
|
||||
|
||||
describe("AdbShellProtocolPacket", () => {
|
||||
it("should serialize", () => {
|
||||
assert.deepStrictEqual(
|
||||
AdbShellProtocolPacket.serialize({
|
||||
id: AdbShellProtocolId.Stdout,
|
||||
data: new Uint8Array([1, 2, 3, 4]),
|
||||
}),
|
||||
new Uint8Array([1, 4, 0, 0, 0, 1, 2, 3, 4]),
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
describe("AdbSubprocessShellProtocol", () => {
|
||||
describe("`stdout` and `stderr`", () => {
|
||||
it("should parse data from `socket", () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue