fix(client): get jquery from cdn (#44421)
* fix: ensures jquery exists for those challenges
For tests frame-runner.js imports jquery, but jquery challenges always
need it
* Revert "Revert "fix: only include frame-runner when running tests (#44337)" (#44419)"
This reverts commit c19bf504b8
.
This commit is contained in:
committed by
GitHub
parent
fee0ac3846
commit
87f5cff3cd
@@ -86,7 +86,8 @@ export function* executeChallengeSaga({ payload }) {
|
||||
const protect = isLoopProtected(challengeMeta);
|
||||
const buildData = yield buildChallengeData(challengeData, {
|
||||
preview: false,
|
||||
protect
|
||||
protect,
|
||||
usesTestRunner: true
|
||||
});
|
||||
const document = yield getContext('document');
|
||||
const testRunner = yield call(
|
||||
|
@@ -132,12 +132,13 @@ async function getDOMTestRunner(buildData, { proxyLogger }, document) {
|
||||
runTestInTestFrame(document, testString, testTimeout);
|
||||
}
|
||||
|
||||
export function buildDOMChallenge({
|
||||
challengeFiles,
|
||||
required = [],
|
||||
template = ''
|
||||
}) {
|
||||
const finalRequires = [...required, ...frameRunner];
|
||||
export function buildDOMChallenge(
|
||||
{ challengeFiles, required = [], template = '' },
|
||||
{ usesTestRunner } = { usesTestRunner: false }
|
||||
) {
|
||||
const finalRequires = [...required];
|
||||
if (usesTestRunner) finalRequires.push(...frameRunner);
|
||||
|
||||
const loadEnzyme = challengeFiles.some(
|
||||
challengeFile => challengeFile.ext === 'jsx'
|
||||
);
|
||||
|
Reference in New Issue
Block a user