Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
describe('lib:windows-utilities', function() {
if (os.platform() !== 'win32') {
return;
}
var EventLogger = require('node-windows').EventLogger;
var log = new EventLogger(provider);
describe('#streamEventLog()', function() {
it('streams event logs to a socket', function() {
this.timeout(100000);
const MockWebSocket = require('mock-socket').WebSocket;
const MockServer = require('mock-socket').Server;
var server = new MockServer('ws://localhost:40002');
var socket = new MockWebSocket('ws://localhost:40002');
socket.connected = true;
var lineBuffer = require('../../lib/linebuffer');
lineBuffer.setSocket(socket);
var windowsUtilities = requireUncached('../../lib/windows-utilities');
return new Promise((resolve) => {
server.on('message', data => {
debug('received message!');