* Allow running specific plugin tests using ENV variables * Add a `rake plugin:qunit` task to match the existing `rake plugin:spec` task * Improve docker.rake to allow running specific plugin qunit tests * Purge cache before and after qunit tests * Stop module auto-loader trying to auto-load tests * Use URL query parameters to pass config into Qunit, avoiding caching issues * Oops, searchParams doesn’t work in phantomJS. Parse the URL manually. * Escape ampersands before passing URL to phantomJS, otherwise multiple parameters go wrong
19 lines
515 B
JavaScript
19 lines
515 B
JavaScript
import { registerHelpers } from 'discourse-common/lib/helpers';
|
|
|
|
export function autoLoadModules(container, registry) {
|
|
Object.keys(requirejs.entries).forEach(entry => {
|
|
if ((/\/helpers\//).test(entry) && !(/-test/).test(entry)) {
|
|
requirejs(entry, null, null, true);
|
|
}
|
|
if ((/\/widgets\//).test(entry) && !(/-test/).test(entry)) {
|
|
requirejs(entry, null, null, true);
|
|
}
|
|
});
|
|
registerHelpers(registry);
|
|
}
|
|
|
|
export default {
|
|
name: 'auto-load-modules',
|
|
initialize: autoLoadModules
|
|
};
|