diff --git a/tests/commonjs.cjs b/tests/commonjs.cjs new file mode 100644 index 0000000..c400d45 --- /dev/null +++ b/tests/commonjs.cjs @@ -0,0 +1,21 @@ +"use strict"; + +let AJQueryDefault = require("../"); +let AJQueryExplicit = require("../ajquery.cjs"); + +if (!AJQueryDefault.$) { + throw new Error("did not export $ correctly"); +} +if (!AJQueryDefault.$$) { + throw new Error("did not export $$ correctly"); +} + +if (AJQueryDefault.$ !== AJQueryExplicit.$) { + throw new Error("exported $s do not match"); +} + +if (AJQueryDefault.$$ !== AJQueryExplicit.$$) { + throw new Error("exported $$s do not match"); +} + +console.log(`\x1b[34mPASS\x1b[33m`);