Mirror von
https://github.com/coolaj86/ajquery.js.git
synchronisiert 2024-11-16 17:29:02 +00:00
test: commonjs can be required
Dieser Commit ist enthalten in:
Ursprung
cef7e822eb
Commit
b47f4eeb31
21
tests/commonjs.cjs
Normale Datei
21
tests/commonjs.cjs
Normale Datei
@ -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`);
|
||||||
Laden…
x
In neuem Issue referenzieren
Einen Benutzer sperren