created assert stub for the browser

This commit is contained in:
javi 2013-07-31 12:33:19 +02:00
parent 1d752708c4
commit 2ae7743c7d
2 changed files with 8 additions and 3 deletions

7
browser/assert.js Normal file
View File

@ -0,0 +1,7 @@
var assert = {
ok: function(value, message) {
message = message || '';
if(!value) throw new Error("assertion failed", message);
}
}

View File

@ -1,7 +1,5 @@
(function(tree) {
var assert = require('assert') || {
ok: function() { }
};
var assert = require('assert');
tree.Definition = function Definition(selector, rules) {
this.elements = selector.elements;