diff options
Diffstat (limited to 'node_modules/node-wifi/src/macOS/delete/__test__/command.spec.js')
-rw-r--r-- | node_modules/node-wifi/src/macOS/delete/__test__/command.spec.js | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/node_modules/node-wifi/src/macOS/delete/__test__/command.spec.js b/node_modules/node-wifi/src/macOS/delete/__test__/command.spec.js new file mode 100644 index 0000000..37c7540 --- /dev/null +++ b/node_modules/node-wifi/src/macOS/delete/__test__/command.spec.js @@ -0,0 +1,21 @@ +const command = require('../command'); + +describe('mac Os delete connection command', () => { + it('should generate basic command without iface', () => { + const config = { iface: null }; + const accessPoint = { ssid: 'ssid' }; + expect(command(config, accessPoint)).toEqual({ + cmd: '/usr/sbin/networksetup', + args: ['-removepreferredwirelessnetwork', 'en0', 'ssid'] + }); + }); + + it('should generate basic command without iface', () => { + const config = { iface: 'en2' }; + const accessPoint = { ssid: 'ssid' }; + expect(command(config, accessPoint)).toEqual({ + cmd: '/usr/sbin/networksetup', + args: ['-removepreferredwirelessnetwork', 'en2', 'ssid'] + }); + }); +}); |