diff --git a/packages/plugins/ens/package.json b/packages/plugins/ens/package.json index a87cdbdf0..a1b0f5d42 100644 --- a/packages/plugins/ens/package.json +++ b/packages/plugins/ens/package.json @@ -34,7 +34,7 @@ "ci": "npm run qa", "clean": "npm run reset", "lint": "eslint src/", - "qa": "npm-run-all lint _build", + "qa": "npm-run-all lint _build test", "reset": "npx rimraf dist embark-*.tgz package", "solo": "embark-solo", "test": "jest" diff --git a/packages/plugins/ens/test/index.js b/packages/plugins/ens/test/index.js index 98046a506..ccc0d560a 100644 --- a/packages/plugins/ens/test/index.js +++ b/packages/plugins/ens/test/index.js @@ -19,7 +19,8 @@ describe('embark-ens', () => { namesystemConfig: { register: { rootDomain: 'root.eth' - } + }, + dappConnection: [] } }; }); @@ -29,17 +30,18 @@ describe('embark-ens', () => { }); it("should register the right artifact", (done) => { - const pipelineRegisterHandler = jest.fn((args, cb) => { - expect(args).toEqual({ - path: ['test-dir', 'config'], - file: 'namesystem.json', - format: 'json', - content: Object.assign({}, embark.config.namesystemConfig, ens.getEnsConfig()) + const pipelineRegisterHandler = jest.fn(async (args, cb) => { + ens.getEnsConfig((err, config) => { + expect(args).toEqual({ + path: ['test-dir', 'config'], + file: 'namesystem.json', + format: 'json', + content: Object.assign({}, embark.config.namesystemConfig, config) + }); + cb(); + done(); }); - cb(); - done(); }); - ens.getEnsConfig = jest.fn(); embark.events.setCommandHandler('pipeline:register', pipelineRegisterHandler);