fix(client): remove normalize.css from globals (#44403)
This commit is contained in:
@ -91,7 +91,7 @@ A required file can not have both a src and a link: src = ${src}, link = ${link}
|
|||||||
}
|
}
|
||||||
return '';
|
return '';
|
||||||
})
|
})
|
||||||
.reduce((head, element) => head.concat(element));
|
.reduce((head, element) => head.concat(element), []);
|
||||||
|
|
||||||
const indexHtml = findIndexHtml(challengeFiles);
|
const indexHtml = findIndexHtml(challengeFiles);
|
||||||
|
|
||||||
|
@ -23,14 +23,6 @@ const frameRunner = [
|
|||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
const globalRequires = [
|
|
||||||
{
|
|
||||||
link:
|
|
||||||
'https://cdnjs.cloudflare.com/' +
|
|
||||||
'ajax/libs/normalize/4.2.0/normalize.min.css'
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
const applyFunction = fn =>
|
const applyFunction = fn =>
|
||||||
async function (file) {
|
async function (file) {
|
||||||
try {
|
try {
|
||||||
@ -142,7 +134,7 @@ export function buildDOMChallenge(
|
|||||||
{ challengeFiles, required = [], template = '' },
|
{ challengeFiles, required = [], template = '' },
|
||||||
{ usesTestRunner } = { usesTestRunner: false }
|
{ usesTestRunner } = { usesTestRunner: false }
|
||||||
) {
|
) {
|
||||||
const finalRequires = [...globalRequires, ...required];
|
const finalRequires = [...required];
|
||||||
if (usesTestRunner) finalRequires.push(...frameRunner);
|
if (usesTestRunner) finalRequires.push(...frameRunner);
|
||||||
|
|
||||||
const loadEnzyme = challengeFiles.some(
|
const loadEnzyme = challengeFiles.some(
|
||||||
|
@ -25,12 +25,7 @@ After this, you will be able to use `data[index]` to get that item in the array.
|
|||||||
test-text
|
test-text
|
||||||
|
|
||||||
```js
|
```js
|
||||||
const script = $('.dashboard').siblings('script')[1].innerHTML;
|
assert.match(code,/const index = data.findIndex\(\(?d\)? => (year === d\.year|d.year === year)\s*\)/g);
|
||||||
assert(
|
|
||||||
/var index = data.findIndex\(function \(d\) \{\s*return (year === d\.year|d.year === year);\s*\}\);/g.test(
|
|
||||||
script
|
|
||||||
)
|
|
||||||
);
|
|
||||||
```
|
```
|
||||||
|
|
||||||
# --seed--
|
# --seed--
|
||||||
|
@ -20,12 +20,9 @@ So now, when you hover a label, the function will be called with the year that i
|
|||||||
test-text
|
test-text
|
||||||
|
|
||||||
```js
|
```js
|
||||||
const script = $('.dashboard').siblings('script')[1].innerHTML;
|
assert.match(code,
|
||||||
assert(
|
/\.on\('mouseover', d => drawDashboard\(d\)\)/g
|
||||||
/\.on\(('|"|`)mouseover\1, function \(d\) \{\s*return drawDashboard\(d\);\s*\}\)/g.test(
|
);
|
||||||
script
|
|
||||||
)
|
|
||||||
);
|
|
||||||
```
|
```
|
||||||
|
|
||||||
# --seed--
|
# --seed--
|
||||||
|
@ -16,8 +16,7 @@ Go back to the top of the function and use `d3.select` to select the `.dashboard
|
|||||||
test-text
|
test-text
|
||||||
|
|
||||||
```js
|
```js
|
||||||
const script = $('.dashboard').siblings('script')[1].innerHTML;
|
assert.match(code, /d3\.select\(('|"|`)\.dashboard\1\)\.html\(('|"|`)\2\)/g);
|
||||||
assert(/d3\.select\(('|"|`)\.dashboard\1\)\.html\(('|"|`)\2\)/g.test(script));
|
|
||||||
```
|
```
|
||||||
|
|
||||||
# --seed--
|
# --seed--
|
||||||
|
@ -14,11 +14,8 @@ Create another `mouseover` event for when you hover one of the `twitter-circles`
|
|||||||
test-text
|
test-text
|
||||||
|
|
||||||
```js
|
```js
|
||||||
const script = $('.dashboard').siblings('script')[1].innerHTML;
|
assert.match(code,
|
||||||
assert(
|
/\.on\('mouseover', d => drawDashboard\(d\.year\)\)/
|
||||||
/\.on\(('|"|`)mouseover\1, function \(d\) \{\s*return drawDashboard\(d\.year\);\s*\}\)/g.test(
|
|
||||||
script
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -16,11 +16,10 @@ After that, you will be able hover any of the circles or year labels to get the
|
|||||||
test-text
|
test-text
|
||||||
|
|
||||||
```js
|
```js
|
||||||
const script = $('.dashboard').siblings('script')[1].innerHTML;
|
assert.equal(
|
||||||
assert(
|
code.match(
|
||||||
script.match(
|
/\.on\('mouseover', d => drawDashboard\(d\.year\)\)/g
|
||||||
/\.on\(('|"|`)mouseover\1, function \(d\) \{\s*return drawDashboard\(d\.year\);\s*\}\)/g
|
)?.length, 3
|
||||||
).length === 3
|
|
||||||
);
|
);
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user