Skip to content

Commit dcd2e0f

Browse files
committed
Fixed issue with tests after using multithreading
1 parent 3d4b318 commit dcd2e0f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

battleship.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@ const cliColor = require('cli-color');
55
const beep = require('beepbeep');
66
const position = require("./GameController/position.js");
77
const letters = require("./GameController/letters.js");
8-
9-
let telemetryWorker = new Worker("./TelemetryClient/telemetryClient.js");
8+
let telemetryWorker;
109

1110
class Battleship {
1211
start() {
12+
telemetryWorker = new Worker("./TelemetryClient/telemetryClient.js");
13+
1314
console.log("Starting...");
1415
telemetryWorker.postMessage({eventName: 'ApplicationStarted', properties: {Technology: 'Node.js'}});
1516

0 commit comments

Comments
 (0)