Skip to content

Commit

Permalink
test: fix tests after xjst update
Browse files Browse the repository at this point in the history
  • Loading branch information
indutny committed May 14, 2013
1 parent 4817070 commit 9007b55
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion lib/bemhtml/compiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,6 @@ Compiler.prototype.compile = function compile(code) {
var out = this.generate(code),
exports = {};

require('fs').writeFileSync('/tmp/1.js', out);
vm.runInNewContext(out, { exports: exports, console: console });

return exports;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"esprima": "~1.0.2",
"ometajs": "~3.2.2",
"uglify-js": "~2.3.2",
"xjst": "~0.6.1"
"xjst": "~0.7.0"
},
"devDependencies": {
"mocha": "~1.9.0",
Expand Down
6 changes: 3 additions & 3 deletions test/fixtures/i-bem.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = function() {

if (this.$override) (function() {
oninit(function(exports) {

var BEM_ = {},
toString = Object.prototype.toString,
Expand Down Expand Up @@ -256,13 +256,13 @@ BEMContext.prototype.generateId = function generateId() {
var oldApply = exports.apply;

// Wrap xjst's apply and export our own
this.$exports.apply = BEMContext.apply = function _apply() {
exports.apply = BEMContext.apply = function _apply() {
var ctx = new BEMContext(this, oldApply);
ctx.apply();
return ctx._buf.join('');
};

}).call(this); // this.$override
}); // oninit

match(this._mode === '')(
match()(function() {
Expand Down

0 comments on commit 9007b55

Please sign in to comment.