css-controls
Version:
Cross-browser stylesheet creation and css rule creation/deletion (includes IE6 support)
16 lines (15 loc) • 409 B
JavaScript
// Create and expose assertion methods (node assertion messages suck in browser)
module.exports = {
strictEqual: function (a, b, msg) {
if (a !== b) {
msg = msg || ('Assertion error: ' + a + ' !== ' + b);
throw new Error(msg);
}
},
notEqual: function (a, b, msg) {
if (a == b) {
msg = msg || ('Assertion error: ' + a + ' == ' + b);
throw new Error(msg);
}
}
};