-
Notifications
You must be signed in to change notification settings - Fork 781
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
288 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/* global module, exports */ | ||
import QUnit from './qunit.js'; | ||
|
||
// For Node.js | ||
if (typeof module !== 'undefined' && module && module.exports) { | ||
module.exports = QUnit; | ||
} | ||
|
||
// For CommonJS with exports, but without module.exports, like Rhino | ||
if (typeof exports !== 'undefined' && exports) { | ||
exports.QUnit = QUnit; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* eslint-env node */ | ||
|
||
// In a single bundler invocation, if different parts or dependencies | ||
// of a project mix ESM and CJS, avoid a split-brain state by making | ||
// sure both import and re-use the same instance via this wrapper. | ||
// | ||
// Bundlers generally allow requiring an ESM file from CommonJS. | ||
const { QUnit } = require('./esm/qunit.module.js'); | ||
module.exports = QUnit; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// In a single Node.js process, if different parts or dependencies | ||
// of a project mix ESM and CJS, avoid a split-brain state by making | ||
// sure both import and re-use the same instance via this wrapper. | ||
// | ||
// Node.js 18+ can import a CommonJS file from ESM. | ||
import QUnit from '../qunit.js'; | ||
|
||
export const { | ||
assert, | ||
begin, | ||
config, | ||
diff, | ||
done, | ||
dump, | ||
equiv, | ||
hooks, | ||
is, | ||
isLocal, | ||
log, | ||
module, | ||
moduleDone, | ||
moduleStart, | ||
objectType, | ||
on, | ||
only, | ||
onUncaughtException, | ||
pushFailure, | ||
reporters, | ||
skip, | ||
stack, | ||
start, | ||
test, | ||
testDone, | ||
testStart, | ||
todo, | ||
urlParams, | ||
version | ||
} = QUnit; | ||
|
||
export { QUnit }; | ||
|
||
export default QUnit; |
Oops, something went wrong.