Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
keeramis committed May 14, 2024
1 parent 4d0c3db commit 135d91c
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/network-device.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ describe('NetworkDevice', () => {
'index': 4,
'name': 'wl3',
'type': 8,
'flags': 98307,
'extFlags': 1048576,
'ipv4Config': {
'dns': [
{
Expand Down Expand Up @@ -80,7 +82,10 @@ describe('NetworkDevice', () => {
}
]
},
'hwAddress': Buffer.from([48,174,164,229,83,16])
'hwAddress': Buffer.from([48,174,164,229,83,16]),
'mtu': 1500,
'metric': 0,
'profile': Buffer.from([])
};

const expectedOutput = {
Expand All @@ -100,7 +105,13 @@ describe('NetworkDevice', () => {
'gateway': undefined,
'dns': ['0002:0104:0306:0508:070a:090c:0b0e:0d0f'],
'source': 'UNKNOWN'
}
},
'mtu': 1500,
'flagsVal': 98307,
'extFlags': 1048576,
'flagsStrings': ['UP', "BROADCAST", 'MULTICAST', 'NOND6'],

Check failure on line 112 in src/network-device.test.js

View workflow job for this annotation

GitHub Actions / Test (Node.js v12)

Strings must use singlequote

Check failure on line 112 in src/network-device.test.js

View workflow job for this annotation

GitHub Actions / Test (Node.js v14)

Strings must use singlequote

Check failure on line 112 in src/network-device.test.js

View workflow job for this annotation

GitHub Actions / Test (Node.js v16)

Strings must use singlequote
'metric': 0,
'profile': Buffer.from([])
};
sinon.stub(dev, 'sendRequest').resolves({ interface: input });

Expand Down

0 comments on commit 135d91c

Please sign in to comment.