diff --git a/lib/ClientManager.js b/lib/ClientManager.js index 65686f1..9c62d03 100644 --- a/lib/ClientManager.js +++ b/lib/ClientManager.js @@ -11,6 +11,8 @@ class ClientManager { constructor(opt) { this.opt = opt || {}; + this.opt.tokens = this.opt.tokens || {}; + // id -> client instance this.clients = new Map(); diff --git a/package.json b/package.json index 0693b8d..c166166 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "ws": "5.1.1" }, "scripts": { - "test": "mocha --check-leaks --require esm './**/*.test.js'", + "test": "mocha --check-leaks --require esm ./**/*.test.js", "start": "./bin/server", "dev": "node-dev bin/server --port 3000" }