diff --git a/src/vs/base/test/node/id.test.ts b/src/vs/base/test/node/id.test.ts index 0cddcf542492d..85a58de60ffa7 100644 --- a/src/vs/base/test/node/id.test.ts +++ b/src/vs/base/test/node/id.test.ts @@ -5,13 +5,22 @@ 'use strict'; import * as assert from 'assert'; +import * as getmac from 'getmac'; import { getMachineId } from 'vs/base/node/id'; suite('ID', () => { test('getMachineId', function () { return getMachineId().then(id => { - assert.ok(/^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$/.test(id), `Expected a MAC address: ${id}`); + assert.ok(id); + }); + }); + + test('getMac', function () { + return new Promise((resolve, reject) => { + getmac.getMac((err, macAddress) => err ? reject(err) : resolve(macAddress)); + }).then(macAddress => { + assert.ok(/^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$/.test(macAddress), `Expected a MAC address, got: ${macAddress}`); }); }); }); \ No newline at end of file