diff --git a/README.md b/README.md index 497c9d8..fd3077c 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,9 @@ Import mock-echo Replace global object `Echo` with `new MockEcho()` before every unit test ```javascript + +let mockEcho + beforeEach(() => { mockEcho = new MockEcho() global.Echo = mockEcho diff --git a/index.js b/index.js deleted file mode 100644 index e1a768c..0000000 --- a/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = (message) => message.toUpperCase(); \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index b67f63d..a1a9ed0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "mock-echo", - "version": "0.0.1", + "version": "0.0.3", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index cd92071..a19eddc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mock-echo", - "version": "0.0.3", + "version": "1.0.0", "description": "Mock laravel Echo", "main": "dist/index.js", "scripts": { @@ -26,7 +26,7 @@ "lodash": "^4.17.10" }, "devDependencies": { - "@types/lodash": "^4.14.93", + "@types/lodash": "^4.14.120", "@types/node": "^6.0.60", "typescript": "^2.6.0" }, diff --git a/src/index.ts b/src/index.ts index 2864d87..0654f53 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,4 +1,4 @@ -import _ from 'lodash' +import * as _ from "lodash"; class Channel { events: object