systemlynx 1.12.9 → 1.12.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "systemlynx",
3
- "version": "1.12.9",
3
+ "version": "1.12.10",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "browser": {
@@ -11,7 +11,7 @@ SocketServer.listen(port);
11
11
 
12
12
  describe("SocketDispatcher", () => {
13
13
  const eventName = "test-event";
14
- const dispatcher = SocketDispatcher(`http://localhost:${port}/${namespace}`);
14
+ const dispatcher = new SocketDispatcher(`http://localhost:${port}/${namespace}`);
15
15
  it("should return an EventDispatcher object with methods on and emit", async () => {
16
16
  expect(dispatcher)
17
17
  .to.be.an("object")
@@ -1,7 +1,7 @@
1
1
  const throttle = require("../../utils/throttle");
2
2
 
3
3
  module.exports = function createDispatcher(events = {}, systemContext) {
4
- const Dispatcher = this !== window ? this || {} : {};
4
+ const Dispatcher = this || {};
5
5
 
6
6
  Dispatcher.emit = (eventName, data, event) => {
7
7
  if (events[eventName])
@@ -2,7 +2,7 @@ const { expect } = require("chai");
2
2
  const Dispatcher = require("./Dispatcher");
3
3
 
4
4
  describe("createDispatcher", () => {
5
- const dispatcher = Dispatcher();
5
+ const dispatcher = new Dispatcher();
6
6
  it("should return an EventDispatcher object with methods on and emit", async () => {
7
7
  expect(dispatcher)
8
8
  .to.be.an("object")