Skip to content

Commit 3774237

Browse files
committed
Tests: fix CodeQL failures
1 parent a07dd47 commit 3774237

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

mavlink/mavManager.test.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ describe('MAVLink Functions', function () {
2929
assert.equal(m.conStatusInt(), 0)
3030
assert.equal(m.statusArmed, 0)
3131

32-
var hb = new Buffer.from([0xfd, 0x09, 0x00, 0x00, 0x07, 0x2a, 0x96, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x05, 0x03, 0x2d, 0x0d, 0x02, 0x7e, 0xfd])
32+
const hb = new Buffer.from([0xfd, 0x09, 0x00, 0x00, 0x07, 0x2a, 0x96, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x05, 0x03, 0x2d, 0x0d, 0x02, 0x7e, 0xfd])
3333
m.inStream.write(hb)
3434

3535
assert.equal(m.conStatusStr(), 'Connected')
@@ -40,8 +40,8 @@ describe('MAVLink Functions', function () {
4040
assert.equal(packets.length, 1)
4141

4242
// check arming
43-
var hb = new Buffer.from([0xfd, 0x09, 0x00, 0x01, 0x07, 0x2a, 0x96, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x05, 0x03, 0x8d, 0x0d, 0x02, 0x4c, 0x4f])
44-
m.inStream.write(hb)
43+
const hbb = new Buffer.from([0xfd, 0x09, 0x00, 0x01, 0x07, 0x2a, 0x96, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x05, 0x03, 0x8d, 0x0d, 0x02, 0x4c, 0x4f])
44+
m.inStream.write(hbb)
4545
})
4646

4747
it('#versionSend()', function (done) {
@@ -124,7 +124,7 @@ describe('MAVLink Functions', function () {
124124
})
125125

126126
udpStream.on('message', (msg, rinfo) => {
127-
msg.should.eql(Buffer.from([253, 09, 00, 00, 00, 00, 191, 00, 00, 00, 00, 00, 00, 00, 18, 08, 00, 00, 02, 61, 244 ]))
127+
msg.should.eql(Buffer.from([253, 9, 0, 0, 0, 0, 191, 0, 0, 0, 0, 0, 0, 0, 18, 8, 0, 0, 2, 61, 244 ]))
128128
m.close()
129129
udpStream.close()
130130
done()
@@ -146,7 +146,7 @@ describe('MAVLink Functions', function () {
146146
})
147147

148148
udpStream.on('message', (msg, rinfo) => {
149-
msg.should.eql(Buffer.from([253, 09, 00, 00, 00, 00, 191, 77, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 255, 197, 27 ]))
149+
msg.should.eql(Buffer.from([253, 9, 0, 0, 0, 0, 191, 77, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 197, 27]))
150150
m.close()
151151
udpStream.close()
152152
done()

0 commit comments

Comments
 (0)