Warn if jasmine-core is loaded as an ES module in browsers

This commit is contained in:
Steve Gravrock
2025-10-05 09:03:27 -07:00
parent 67ef721c85
commit b881b0077d
3 changed files with 22 additions and 0 deletions

View File

@@ -94,6 +94,9 @@ var getJasmineRequireObj = (function() {
j$.private.matchers = jRequire.requireMatchers(jRequire, j$);
j$.private.asyncMatchers = jRequire.requireAsyncMatchers(jRequire, j$);
j$.private.loadedAsBrowserEsm =
globalThis.document && !globalThis.document.currentScript;
return j$;
};