Skip to content

Commit

Permalink
test(bemhtml): stub console error
Browse files Browse the repository at this point in the history
  • Loading branch information
Андрей Абрамов committed Sep 30, 2017
1 parent a647581 commit fc3752d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -50,6 +50,7 @@
"must": "^0.13.1",
"node-eval": "^1.0.2",
"proxyquire": "^1.7.10",
"sinon": "^4.0.0",
"ym": "^0.1.2"
},
"scripts": {
Expand Down
11 changes: 10 additions & 1 deletion test/techs/bemhtml.test.js
Expand Up @@ -5,7 +5,8 @@ var fs = require('fs'),
Tech = require('../../techs/bemhtml'),
loadDirSync = require('mock-enb/utils/dir-utils').loadDirSync,
FileList = require('enb/lib/file-list'),
bundlePath = path.resolve('lib/bundle.js');
bundlePath = path.resolve('lib/bundle.js'),
sinon = require('sinon');

describe('bemhtml', function () {
before(function () {
Expand Down Expand Up @@ -120,6 +121,14 @@ describe('bemhtml', function () {
});

describe('engineOptions', function () {
beforeEach(function () {
sinon.stub(console, 'error');
});

afterEach(function () {
console.error.restore();
});

it('must not add i-bem class by default', function () {
var blocks = {
'block.bemhtml.js': 'block("block").tag()("div")'
Expand Down

0 comments on commit fc3752d

Please sign in to comment.