Skip to content

Commit

Permalink
test: should return first ethernet addrs (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
slyon authored Apr 19, 2023
1 parent a8f8ebd commit 573eef9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/address.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ describe('test/address.test.js', () => {
address((err, addr) => {
assert(!err);
assert.deepStrictEqual(Object.keys(addr), [ 'ip', 'ipv6', 'mac' ]);
assert.match(addr.mac, /^(?:[a-z0-9]{2}\:){5}[a-z0-9]{2}$/i);
assert.match(addr.ip, /^\d+\.\d+\.\d+\.\d+$/);
addr.mac && assert.match(addr.mac, /^(?:[a-z0-9]{2}\:){5}[a-z0-9]{2}$/i);
addr.ip && assert.match(addr.ip, /^\d+\.\d+\.\d+\.\d+$/);
done();
});
});
Expand Down

0 comments on commit 573eef9

Please sign in to comment.