Files
jasmine/spec/helpers/nodeDefineJasmineUnderTest.js
Steve Gravrock 434575f49d Use one declaration per statement
The old style of merging all of a function's variable declarations into
a single statement made some sense back in the days of var, but there's
no reason to keep doing it now that we use const and let.
2026-03-11 06:30:46 -07:00

31 lines
761 B
JavaScript

(function() {
const path = require('path');
const glob = require('glob');
const jasmineUnderTestRequire = require(path.join(
__dirname,
'../../src/core/requireCore.js'
));
global.getJasmineRequireObj = function() {
return jasmineUnderTestRequire;
};
function getSourceFiles() {
const globs = ['../../src/core/**/*.js', '../../src/version.js'];
const srcFiles = globs.flatMap(g => glob.sync(g, { cwd: __dirname }));
for (const file of srcFiles) {
require(file);
}
}
getSourceFiles();
global.jasmineUnderTest = jasmineUnderTestRequire.core(
jasmineUnderTestRequire
);
// Alias the private namespace so tests can be less verbose
global.privateUnderTest = global.jasmineUnderTest.private;
})();