diff --git a/package.json b/package.json index 0491b48..4ce229e 100644 --- a/package.json +++ b/package.json @@ -53,6 +53,7 @@ "ym": "^0.1.2" }, "scripts": { + "prepublish": "npm test", "pretest": "eslint . && jscs -c .jscs.js .", "test": "mocha -R spec", "cover": "istanbul cover _mocha", diff --git a/test/techs/bemhtml.test.js b/test/techs/bemhtml.test.js index 963d194..7c98aef 100644 --- a/test/techs/bemhtml.test.js +++ b/test/techs/bemhtml.test.js @@ -301,6 +301,10 @@ function build(templates, options) { }); } + // mock for bemhtml.generate() + var bemhtmlPath = './node_modules/bem-xjst/lib/bemhtml/bundle.js' + scheme[bemhtmlPath] = require('fs').readFileSync(bemhtmlPath, 'utf8'); + mock(scheme); bundle = new MockNode('bundle'); diff --git a/test/techs/bemtree.test.js b/test/techs/bemtree.test.js index b766e90..3609a34 100644 --- a/test/techs/bemtree.test.js +++ b/test/techs/bemtree.test.js @@ -213,6 +213,10 @@ function build(templates, options) { }); } + // mock for bemhtml.generate() + var bemtreePath = './node_modules/bem-xjst/lib/bemtree/bundle.js' + scheme[bemtreePath] = require('fs').readFileSync(bemtreePath, 'utf8'); + mock(scheme); bundle = new MockNode('bundle');