This commit is contained in:
parent
2ecc2e7235
commit
a367cab8c3
@ -21,7 +21,7 @@ afterAll(async (done) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
test("Set LED color to BLUE via discrete value", async (done) => {
|
test("Set LED color via discrete value", async (done) => {
|
||||||
remote.setLEDColor(Consts.Color.BLUE);
|
remote.setLEDColor(Consts.Color.BLUE);
|
||||||
expect(await device.readFromOutbox()).toEqual(Buffer.from([0x0a, 0x00, 0x41, 0x34, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00]));
|
expect(await device.readFromOutbox()).toEqual(Buffer.from([0x0a, 0x00, 0x41, 0x34, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00]));
|
||||||
expect(await device.readFromOutbox()).toEqual(Buffer.from([0x08, 0x00, 0x81, 0x34, 0x11, 0x51, 0x00, 0x03]));
|
expect(await device.readFromOutbox()).toEqual(Buffer.from([0x08, 0x00, 0x81, 0x34, 0x11, 0x51, 0x00, 0x03]));
|
||||||
@ -37,7 +37,7 @@ test("Turn off LED", async (done) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
test("Set LED color to 127, 32, 233 via RGB values", async (done) => {
|
test("Set LED color via RGB values", async (done) => {
|
||||||
remote.setLEDRGB(127, 32, 233);
|
remote.setLEDRGB(127, 32, 233);
|
||||||
expect(await device.readFromOutbox()).toEqual(Buffer.from([0x0a, 0x00, 0x41, 0x34, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00]));
|
expect(await device.readFromOutbox()).toEqual(Buffer.from([0x0a, 0x00, 0x41, 0x34, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00]));
|
||||||
expect(await device.readFromOutbox()).toEqual(Buffer.from([0x0a, 0x00, 0x81, 0x34, 0x11, 0x51, 0x01, 0x7f, 0x20, 0xe9]));
|
expect(await device.readFromOutbox()).toEqual(Buffer.from([0x0a, 0x00, 0x81, 0x34, 0x11, 0x51, 0x01, 0x7f, 0x20, 0xe9]));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user