UNPKG

@hazae41/phobos

Version:

Modern and minimalist testing library for the web

1 lines 623 B
{"version":3,"file":"assert.cjs","sources":["../../../../src/mods/assert/assert.ts"],"sourcesContent":["import { AssertError } from \"mods/assert/error.js\";\n\n/**\n * Just an assert function\n * @param condition should be true\n * @param message message to throw if condition is false\n */\nexport function assert(condition: boolean, message = \"Expected condition to be true\") {\n if (!condition) throw new AssertError(message)\n}"],"names":["AssertError"],"mappings":";;;;AAEA;;;;AAIG;SACa,MAAM,CAAC,SAAkB,EAAE,OAAO,GAAG,+BAA+B,EAAA;AAClF,IAAA,IAAI,CAAC,SAAS;AAAE,QAAA,MAAM,IAAIA,iBAAW,CAAC,OAAO,CAAC,CAAA;AAChD;;;;"}