@hazae41/phobos
Version:
Modern and minimalist testing library for the web
15 lines (12 loc) • 361 B
JavaScript
import { AssertError } from './error.mjs';
/**
* Just an assert function
* @param condition should be true
* @param message message to throw if condition is false
*/
function assert(condition, message = "Expected condition to be true") {
if (!condition)
throw new AssertError(message);
}
export { assert };
//# sourceMappingURL=assert.mjs.map