Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download
80642 views
1
module.exports = assert;
2
3
function assert(val, msg) {
4
if (!val)
5
throw new Error(msg || 'Assertion failed');
6
}
7
8
assert.equal = function assertEqual(l, r, msg) {
9
if (l != r)
10
throw new Error(msg || ('Assertion failed: ' + l + ' != ' + r));
11
};
12
13