async function registerReporter(reporterModuleName, jasmine) {
let Reporter;
try {
Reporter = await new Loader().load(resolveReporter(reporterModuleName));
} catch (e) {
throw new Error('Failed to load reporter module '+ reporterModuleName +
'\nUnderlying error: ' + e.stack + '\n(end underlying error)');
}
I believe that the code should use the jasmine.loader instead of creating a new Loader() so that we can set the jsLoader: 'require' in a config file when necessary. So something like this
async function registerReporter(reporterModuleName, jasmine) {
let Reporter;
try {
Reporter = await jasmine.loader.load(resolveReporter(reporterModuleName));
} catch (e) {
throw new Error('Failed to load reporter module '+ reporterModuleName +
'\nUnderlying error: ' + e.stack + '\n(end underlying error)');
}
Hello, since the major release to jasmine 4.0.1, the following code described in the documentation fails with the this error
It seems to be caused by this line
https://github.com/jasmine/jasmine-npm/blob/main/lib/command.js#L169
I believe that the code should use the jasmine.loader instead of creating a new Loader() so that we can set the
jsLoader: 'require'
in a config file when necessary. So something like this