diff --git a/client/package.json b/client/package.json index 72593b5e2fa..4cf65259fe8 100644 --- a/client/package.json +++ b/client/package.json @@ -147,7 +147,7 @@ "@types/chai": "^4.3.4", "@types/enzyme": "^3.10.12", "@types/enzyme-adapter-react-16": "1.0.6", - "@types/jest": "27.5.2", + "@types/jest": "29.5.0", "@types/jquery": "^3.5.16", "@types/loadable__component": "5.13.4", "@types/lodash-es": "^4.17.6", @@ -178,6 +178,7 @@ "core-js": "2.6.12", "dotenv": "16.0.3", "gatsby-plugin-webpack-bundle-analyser-v2": "1.1.30", + "jest-environment-jsdom": "29.5.0", "jest-json-schema-extended": "1.0.1", "monaco-editor-webpack-plugin": "4.2.0", "react-test-renderer": "16.14.0", diff --git a/client/src/components/profile/components/__snapshots__/timeline-buttons.test.js.snap b/client/src/components/profile/components/__snapshots__/timeline-buttons.test.js.snap index 5aa81e4dab2..703945ba8ea 100644 --- a/client/src/components/profile/components/__snapshots__/timeline-buttons.test.js.snap +++ b/client/src/components/profile/components/__snapshots__/timeline-buttons.test.js.snap @@ -374,7 +374,7 @@ exports[`should check certification page consistency 1`] = `
:root appears, :import appears
the next paragraph should appear
::import -even though it's an import directive, but if we use the full syntax ::directive-name{attr=\\"name\\" attr2=\\"a/path\\"}
even though it's an import directive, but if we use the full syntax ::directive-name{attr="name" attr2="a/path"}
it goes.
::: name [inline-content] {key=val} a container directive :::
Paragraph 1
-code example
+code example
Paragraph 0
-code example 0
+code example 0
Some inline code
Some italics
A second answer paragraph.
", @@ -40,48 +40,48 @@ Object { ], "solution": 3, "text": "Question line 1
- var x = 'y';
+ var x = 'y';
",
},
- "solutions": Array [],
- "tests": Array [],
+ "solutions": [],
+ "tests": [],
}
`;
exports[`challenge parser should import md from other files 1`] = `
-Object {
- "assignments": Array [],
- "challengeFiles": Array [
- Object {
+{
+ "assignments": [],
+ "challengeFiles": [
+ {
"contents": "
",
- "editableRegionBoundaries": Array [],
+ "editableRegionBoundaries": [],
"ext": "html",
"head": "",
"id": "",
"name": "index",
"tail": "",
},
- Object {
+ {
"contents": "body {
background: green;
}",
- "editableRegionBoundaries": Array [],
+ "editableRegionBoundaries": [],
"ext": "css",
"head": "",
"id": "",
"name": "styles",
"tail": "",
},
- Object {
+ {
"contents": "var x = 'y';
for (let index = 0; index < array.length; index++) {
const element = array[index];
// imported from script.md
}",
- "editableRegionBoundaries": Array [],
+ "editableRegionBoundaries": [],
"ext": "js",
"head": "",
"id": "custom-name",
@@ -89,23 +89,23 @@ for (let index = 0; index < array.length; index++) {
"tail": "",
},
],
- "description": "
+ "description": "
Paragraph 1
-code example
+code example
",
- "instructions": "
+ "instructions": "
Paragraph 0
-code example 0
+code example 0
",
- "solutions": Array [],
- "tests": Array [
- Object {
+ "solutions": [],
+ "tests": [
+ {
"testString": "// test code",
"text": "First hint
",
},
- Object {
+ {
"testString": "// more test code",
"text": "Second hint with code
",
},
@@ -114,35 +114,35 @@ for (let index = 0; index < array.length; index++) {
`;
exports[`challenge parser should not mix other YAML with the frontmatter 1`] = `
-Object {
- "assignments": Array [],
- "challengeFiles": Array [
- Object {
+{
+ "assignments": [],
+ "challengeFiles": [
+ {
"contents": "
",
- "editableRegionBoundaries": Array [],
+ "editableRegionBoundaries": [],
"ext": "html",
"head": "",
"id": "",
"name": "index",
"tail": "",
},
- Object {
+ {
"contents": "body {
background: green;
}",
- "editableRegionBoundaries": Array [],
+ "editableRegionBoundaries": [],
"ext": "css",
"head": "",
"id": "",
"name": "styles",
"tail": "",
},
- Object {
+ {
"contents": "var x = 'y';",
- "editableRegionBoundaries": Array [],
+ "editableRegionBoundaries": [],
"ext": "js",
"head": "",
"id": "",
@@ -150,27 +150,27 @@ Object {
"tail": "",
},
],
- "description": "
+ "description": "
Paragraph 1
-code example
+code example
-key:
+key:
- subkey: value
anothersubkey: another value
",
- "instructions": "
+ "instructions": "
Paragraph 0
-code example 0
+code example 0
",
- "solutions": Array [],
- "tests": Array [
- Object {
+ "solutions": [],
+ "tests": [
+ {
"testString": "// test code",
"text": "First hint
",
},
- Object {
+ {
"testString": "// more test code",
"text": "Second hint with code
",
},
@@ -179,10 +179,10 @@ Object {
`;
exports[`challenge parser should parse a more realistic md file 1`] = `
-Object {
- "assignments": Array [],
- "challengeFiles": Array [
- Object {
+{
+ "assignments": [],
+ "challengeFiles": [
+ {
"contents": "
CatPhotoApp
@@ -192,14 +192,14 @@ Object {
Click here to view more
- cat photos.
-
@@ -208,7 +208,7 @@ Object {
",
- "editableRegionBoundaries": Array [
+ "editableRegionBoundaries": [
19,
23,
],
@@ -218,7 +218,7 @@ Object {
"name": "index",
"tail": "",
},
- Object {
+ {
"contents": "body {
background: white;
}
@@ -231,7 +231,7 @@ h1 {
a {
color: green;
}",
- "editableRegionBoundaries": Array [
+ "editableRegionBoundaries": [
7,
9,
],
@@ -241,9 +241,9 @@ a {
"name": "styles",
"tail": "",
},
- Object {
+ {
"contents": "var x = 'y';",
- "editableRegionBoundaries": Array [],
+ "editableRegionBoundaries": [],
"ext": "js",
"head": " // this runs before the user's code is evaluated.",
"id": "final-key",
@@ -251,7 +251,7 @@ a {
"tail": "",
},
],
- "description": "
+ "description": "
When you add a lower rank heading element to the page, it's implied that you're starting a new subsection.
After the last h2 element of the second section element, add an h3 element with the text Things cats love:.
@@ -261,14 +261,14 @@ a {
",
- "instructions": "
+ "instructions": "
Do something with the code.
To test that adjacent tags are handled correctly:
a bit of code with more after a space and another pair of elements with a space
",
- "solutions": Array [
- Array [
- Object {
+ "solutions": [
+ [
+ {
"contents": "
CatPhotoApp
@@ -278,14 +278,14 @@ a {
Click here to view more
- cat photos.
-
@@ -300,7 +300,7 @@ a {
"name": "index",
"tail": "",
},
- Object {
+ {
"contents": "body {
background: white;
}
@@ -319,7 +319,7 @@ a {
"name": "styles",
"tail": "",
},
- Object {
+ {
"contents": "var x = 'y';",
"ext": "js",
"head": "",
@@ -329,38 +329,38 @@ a {
},
],
],
- "tests": Array [
- Object {
+ "tests": [
+ {
"testString": "assert(
document.querySelectorAll('main > section')[1] &&
- code.match(/\\\\<\\\\/section>/g).length == 2
+ code.match(/\\<\\/section>/g).length == 2
);",
"text": "The second section element appears to be missing or does not have both an opening and closing tag.
",
},
- Object {
+ {
"testString": "assert(
document.querySelectorAll('main > section')[1].lastElementChild.nodeName ===
'H3'
);",
"text": "There should be an h3 element right above the second section element's closing tag.
",
},
- Object {
+ {
"testString": "assert(
document
.querySelectorAll('main > section')[1]
.lastElementChild.innerText.toLowerCase()
- .replace(/\\\\s+/g, ' ') === 'things cats love:'
+ .replace(/\\s+/g, ' ') === 'things cats love:'
);",
"text": "The h3 element right above the second section element's closing tag should have the text Things cats love:. Make sure to include the colon at the end of the text.
",
},
- Object {
+ {
"testString": "const secondSectionLastElemNode = document.querySelectorAll('main > section')[1]
.lastElementChild;
assert(
secondSectionLastElemNode.nodeName === 'H3' &&
secondSectionLastElemNode.previousElementSibling.innerText
.toLowerCase()
- .replace(/\\\\s+/g, ' ') === 'cat lists'
+ .replace(/\\s+/g, ' ') === 'cat lists'
);",
"text": "There should be an h2 element with the text Cat Lists above the last h3 element that is nested in the last section element'. You may have accidentally deleted the h2 element.
",
},
@@ -369,35 +369,35 @@ assert(
`;
exports[`challenge parser should parse a simple md file 1`] = `
-Object {
- "assignments": Array [],
- "challengeFiles": Array [
- Object {
+{
+ "assignments": [],
+ "challengeFiles": [
+ {
"contents": "
",
- "editableRegionBoundaries": Array [],
+ "editableRegionBoundaries": [],
"ext": "html",
"head": "",
"id": "",
"name": "index",
"tail": "",
},
- Object {
+ {
"contents": "body {
background: green;
}",
- "editableRegionBoundaries": Array [],
+ "editableRegionBoundaries": [],
"ext": "css",
"head": "",
"id": "",
"name": "styles",
"tail": "",
},
- Object {
+ {
"contents": "var x = 'y';",
- "editableRegionBoundaries": Array [],
+ "editableRegionBoundaries": [],
"ext": "js",
"head": "",
"id": "",
@@ -405,19 +405,19 @@ Object {
"tail": "",
},
],
- "description": "
+ "description": "
Paragraph 1
-code example
+code example
",
- "instructions": "
+ "instructions": "
Paragraph 0
-code example 0
+code example 0
",
- "solutions": Array [
- Array [
- Object {
+ "solutions": [
+ [
+ {
"contents": "
@@ -428,7 +428,7 @@ Object {
"name": "index",
"tail": "",
},
- Object {
+ {
"contents": "body {
background: white;
}",
@@ -438,7 +438,7 @@ Object {
"name": "styles",
"tail": "",
},
- Object {
+ {
"contents": "var x = 'y';
\`\`",
"ext": "js",
@@ -449,16 +449,16 @@ Object {
},
],
],
- "tests": Array [
- Object {
+ "tests": [
+ {
"testString": "// test code",
"text": "First hint
",
},
- Object {
+ {
"testString": "// more test code",
"text": "Second hint with code
",
},
- Object {
+ {
"testString": "// more test code
if(let x of xs) {
console.log(x);
@@ -470,35 +470,35 @@ if(let x of xs) {
`;
exports[`challenge parser should parse frontmatter 1`] = `
-Object {
- "assignments": Array [],
- "challengeFiles": Array [
- Object {
+{
+ "assignments": [],
+ "challengeFiles": [
+ {
"contents": "
",
- "editableRegionBoundaries": Array [],
+ "editableRegionBoundaries": [],
"ext": "html",
"head": "",
"id": "",
"name": "index",
"tail": "",
},
- Object {
+ {
"contents": "body {
background: green;
}",
- "editableRegionBoundaries": Array [],
+ "editableRegionBoundaries": [],
"ext": "css",
"head": "",
"id": "",
"name": "styles",
"tail": "",
},
- Object {
+ {
"contents": "var x = 'y';",
- "editableRegionBoundaries": Array [],
+ "editableRegionBoundaries": [],
"ext": "js",
"head": "",
"id": "",
@@ -507,21 +507,21 @@ Object {
},
],
"challengeType": 0,
- "description": "
+ "description": "
Paragraph 1
-code example
+code example
",
"forumTopicId": 18276,
"id": "bd7123c8c441eddfaeb5bdef",
"isHidden": false,
- "solutions": Array [],
- "tests": Array [
- Object {
+ "solutions": [],
+ "tests": [
+ {
"testString": "// test code",
"text": "First hint
",
},
- Object {
+ {
"testString": "// more test code",
"text": "Second hint with code
",
},
@@ -532,35 +532,35 @@ Object {
`;
exports[`challenge parser should parse gfm strikethrough and frontmatter 1`] = `
-Object {
- "assignments": Array [],
- "challengeFiles": Array [
- Object {
+{
+ "assignments": [],
+ "challengeFiles": [
+ {
"contents": "
",
- "editableRegionBoundaries": Array [],
+ "editableRegionBoundaries": [],
"ext": "html",
"head": "",
"id": "",
"name": "index",
"tail": "",
},
- Object {
+ {
"contents": "body {
background: green;
}",
- "editableRegionBoundaries": Array [],
+ "editableRegionBoundaries": [],
"ext": "css",
"head": "",
"id": "",
"name": "styles",
"tail": "",
},
- Object {
+ {
"contents": "var x = 'y';",
- "editableRegionBoundaries": Array [],
+ "editableRegionBoundaries": [],
"ext": "js",
"head": "",
"id": "",
@@ -568,9 +568,9 @@ Object {
"tail": "",
},
],
- "description": "
+ "description": "
Paragraph 1 Strikethrough text. https://should.not.be.autolinked
-code example
+code example
@@ -587,14 +587,14 @@ Object {
",
- "instructions": "
+ "instructions": "
Paragraph 0
-code example 0
+code example 0
",
- "solutions": Array [
- Array [
- Object {
+ "solutions": [
+ [
+ {
"contents": "
@@ -605,7 +605,7 @@ Object {
"name": "index",
"tail": "",
},
- Object {
+ {
"contents": "body {
background: white;
}",
@@ -615,7 +615,7 @@ Object {
"name": "styles",
"tail": "",
},
- Object {
+ {
"contents": "var x = 'y';
\`\`",
"ext": "js",
@@ -626,16 +626,16 @@ Object {
},
],
],
- "tests": Array [
- Object {
+ "tests": [
+ {
"testString": "// test code",
"text": "First hint
",
},
- Object {
+ {
"testString": "// more test code",
"text": "Second hint with code
",
},
- Object {
+ {
"testString": "// more test code
if(let x of xs) {
console.log(x);
diff --git a/tools/challenge-parser/parser/plugins/__snapshots__/add-frontmatter.test.js.snap b/tools/challenge-parser/parser/plugins/__snapshots__/add-frontmatter.test.js.snap
index f8c4fefdf7c..cd270cc1777 100644
--- a/tools/challenge-parser/parser/plugins/__snapshots__/add-frontmatter.test.js.snap
+++ b/tools/challenge-parser/parser/plugins/__snapshots__/add-frontmatter.test.js.snap
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`process-frontmatter plugin should have an output to match the snapshot 1`] = `
-Object {
+{
"challengeType": 0,
"forumTopicId": 18276,
"id": "bd7123c8c441eddfaeb5bdef",
diff --git a/tools/challenge-parser/parser/plugins/__snapshots__/add-seed.test.js.snap b/tools/challenge-parser/parser/plugins/__snapshots__/add-seed.test.js.snap
index e406f31a815..c0b8705c3cd 100644
--- a/tools/challenge-parser/parser/plugins/__snapshots__/add-seed.test.js.snap
+++ b/tools/challenge-parser/parser/plugins/__snapshots__/add-seed.test.js.snap
@@ -1,34 +1,34 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`add-seed plugin should have an output to match the snapshot 1`] = `
-Object {
- "challengeFiles": Array [
- Object {
+{
+ "challengeFiles": [
+ {
"contents": "
",
- "editableRegionBoundaries": Array [],
+ "editableRegionBoundaries": [],
"ext": "html",
"head": "",
"id": "",
"name": "index",
"tail": "",
},
- Object {
+ {
"contents": "body {
background: green;
}",
- "editableRegionBoundaries": Array [],
+ "editableRegionBoundaries": [],
"ext": "css",
"head": "",
"id": "",
"name": "styles",
"tail": "",
},
- Object {
+ {
"contents": "var x = 'y';",
- "editableRegionBoundaries": Array [],
+ "editableRegionBoundaries": [],
"ext": "js",
"head": "",
"id": "",
diff --git a/tools/challenge-parser/parser/plugins/__snapshots__/add-solution.test.js.snap b/tools/challenge-parser/parser/plugins/__snapshots__/add-solution.test.js.snap
index 1887744ea1f..0da4a27fd24 100644
--- a/tools/challenge-parser/parser/plugins/__snapshots__/add-solution.test.js.snap
+++ b/tools/challenge-parser/parser/plugins/__snapshots__/add-solution.test.js.snap
@@ -1,10 +1,10 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`add solution plugin should have an output to match the snapshot 1`] = `
-Object {
- "solutions": Array [
- Array [
- Object {
+{
+ "solutions": [
+ [
+ {
"contents": "
@@ -15,7 +15,7 @@ Object {
"name": "index",
"tail": "",
},
- Object {
+ {
"contents": "body {
background: white;
}",
@@ -25,7 +25,7 @@ Object {
"name": "styles",
"tail": "",
},
- Object {
+ {
"contents": "var x = 'y';
\`\`",
"ext": "js",
diff --git a/tools/challenge-parser/parser/plugins/__snapshots__/add-tests.test.js.snap b/tools/challenge-parser/parser/plugins/__snapshots__/add-tests.test.js.snap
index 693f5ff9333..aef10341e47 100644
--- a/tools/challenge-parser/parser/plugins/__snapshots__/add-tests.test.js.snap
+++ b/tools/challenge-parser/parser/plugins/__snapshots__/add-tests.test.js.snap
@@ -1,17 +1,17 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`add-tests plugin should have an output to match the snapshot 1`] = `
-Object {
- "tests": Array [
- Object {
+{
+ "tests": [
+ {
"testString": "// test code",
"text": "First hint
",
},
- Object {
+ {
"testString": "// more test code",
"text": "Second hint with code
",
},
- Object {
+ {
"testString": "// more test code
if(let x of xs) {
console.log(x);
diff --git a/tools/challenge-parser/parser/plugins/__snapshots__/add-text.test.js.snap b/tools/challenge-parser/parser/plugins/__snapshots__/add-text.test.js.snap
index d4c9f264e89..7c90c4f0cb4 100644
--- a/tools/challenge-parser/parser/plugins/__snapshots__/add-text.test.js.snap
+++ b/tools/challenge-parser/parser/plugins/__snapshots__/add-text.test.js.snap
@@ -1,15 +1,15 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`add-text should have an output to match the snapshot 1`] = `
-Object {
- "description": "
+{
+ "description": "
Paragraph 1
-code example
+code example
",
- "instructions": "
+ "instructions": "
Paragraph 0
-code example 0
+code example 0
",
}
diff --git a/tools/challenge-parser/parser/plugins/__snapshots__/add-video-question.test.js.snap b/tools/challenge-parser/parser/plugins/__snapshots__/add-video-question.test.js.snap
index 6d204621535..f9833481f62 100644
--- a/tools/challenge-parser/parser/plugins/__snapshots__/add-video-question.test.js.snap
+++ b/tools/challenge-parser/parser/plugins/__snapshots__/add-video-question.test.js.snap
@@ -1,9 +1,9 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`add-video-question plugin should match the video snapshot 1`] = `
-Object {
- "question": Object {
- "answers": Array [
+{
+ "question": {
+ "answers": [
"Some inline code
",
"Some italics
A second answer paragraph.
",
@@ -11,7 +11,7 @@ Object {
],
"solution": 3,
"text": "Question line 1
- var x = 'y';
+ var x = 'y';
",
},
}
diff --git a/tools/challenge-parser/parser/plugins/__snapshots__/replace-imports.test.js.snap b/tools/challenge-parser/parser/plugins/__snapshots__/replace-imports.test.js.snap
index f0451833d8d..765efbab3fb 100644
--- a/tools/challenge-parser/parser/plugins/__snapshots__/replace-imports.test.js.snap
+++ b/tools/challenge-parser/parser/plugins/__snapshots__/replace-imports.test.js.snap
@@ -1,18 +1,18 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`replace-imports should have an output to match the snapshot 1`] = `
-Object {
- "children": Array [
- Object {
- "children": Array [
- Object {
- "position": Object {
- "end": Object {
+{
+ "children": [
+ {
+ "children": [
+ {
+ "position": {
+ "end": {
"column": 18,
"line": 3,
"offset": 68,
},
- "start": Object {
+ "start": {
"column": 3,
"line": 3,
"offset": 53,
@@ -23,13 +23,13 @@ Object {
},
],
"depth": 1,
- "position": Object {
- "end": Object {
+ "position": {
+ "end": {
"column": 18,
"line": 3,
"offset": 68,
},
- "start": Object {
+ "start": {
"column": 1,
"line": 3,
"offset": 51,
@@ -37,16 +37,16 @@ Object {
},
"type": "heading",
},
- Object {
- "children": Array [
- Object {
- "position": Object {
- "end": Object {
+ {
+ "children": [
+ {
+ "position": {
+ "end": {
"column": 12,
"line": 5,
"offset": 81,
},
- "start": Object {
+ "start": {
"column": 1,
"line": 5,
"offset": 70,
@@ -56,13 +56,13 @@ Object {
"value": "Paragraph 1",
},
],
- "position": Object {
- "end": Object {
+ "position": {
+ "end": {
"column": 12,
"line": 5,
"offset": 81,
},
- "start": Object {
+ "start": {
"column": 1,
"line": 5,
"offset": 70,
@@ -70,16 +70,16 @@ Object {
},
"type": "paragraph",
},
- Object {
+ {
"lang": "html",
"meta": null,
- "position": Object {
- "end": Object {
+ "position": {
+ "end": {
"column": 4,
"line": 9,
"offset": 107,
},
- "start": Object {
+ "start": {
"column": 1,
"line": 7,
"offset": 83,
@@ -88,16 +88,16 @@ Object {
"type": "code",
"value": "code example",
},
- Object {
- "children": Array [
- Object {
- "position": Object {
- "end": Object {
+ {
+ "children": [
+ {
+ "position": {
+ "end": {
"column": 19,
"line": 11,
"offset": 127,
},
- "start": Object {
+ "start": {
"column": 3,
"line": 11,
"offset": 111,
@@ -108,13 +108,13 @@ Object {
},
],
"depth": 1,
- "position": Object {
- "end": Object {
+ "position": {
+ "end": {
"column": 19,
"line": 11,
"offset": 127,
},
- "start": Object {
+ "start": {
"column": 1,
"line": 11,
"offset": 109,
@@ -122,16 +122,16 @@ Object {
},
"type": "heading",
},
- Object {
- "children": Array [
- Object {
- "position": Object {
- "end": Object {
+ {
+ "children": [
+ {
+ "position": {
+ "end": {
"column": 12,
"line": 13,
"offset": 140,
},
- "start": Object {
+ "start": {
"column": 1,
"line": 13,
"offset": 129,
@@ -141,13 +141,13 @@ Object {
"value": "Paragraph 0",
},
],
- "position": Object {
- "end": Object {
+ "position": {
+ "end": {
"column": 12,
"line": 13,
"offset": 140,
},
- "start": Object {
+ "start": {
"column": 1,
"line": 13,
"offset": 129,
@@ -155,16 +155,16 @@ Object {
},
"type": "paragraph",
},
- Object {
+ {
"lang": "html",
"meta": null,
- "position": Object {
- "end": Object {
+ "position": {
+ "end": {
"column": 4,
"line": 17,
"offset": 168,
},
- "start": Object {
+ "start": {
"column": 1,
"line": 15,
"offset": 142,
@@ -173,16 +173,16 @@ Object {
"type": "code",
"value": "code example 0",
},
- Object {
- "children": Array [
- Object {
- "position": Object {
- "end": Object {
+ {
+ "children": [
+ {
+ "position": {
+ "end": {
"column": 12,
"line": 19,
"offset": 181,
},
- "start": Object {
+ "start": {
"column": 3,
"line": 19,
"offset": 172,
@@ -193,13 +193,13 @@ Object {
},
],
"depth": 1,
- "position": Object {
- "end": Object {
+ "position": {
+ "end": {
"column": 12,
"line": 19,
"offset": 181,
},
- "start": Object {
+ "start": {
"column": 1,
"line": 19,
"offset": 170,
@@ -207,16 +207,16 @@ Object {
},
"type": "heading",
},
- Object {
- "children": Array [
- Object {
- "position": Object {
- "end": Object {
+ {
+ "children": [
+ {
+ "position": {
+ "end": {
"column": 11,
"line": 21,
"offset": 193,
},
- "start": Object {
+ "start": {
"column": 1,
"line": 21,
"offset": 183,
@@ -226,13 +226,13 @@ Object {
"value": "First hint",
},
],
- "position": Object {
- "end": Object {
+ "position": {
+ "end": {
"column": 11,
"line": 21,
"offset": 193,
},
- "start": Object {
+ "start": {
"column": 1,
"line": 21,
"offset": 183,
@@ -240,16 +240,16 @@ Object {
},
"type": "paragraph",
},
- Object {
+ {
"lang": "js",
"meta": null,
- "position": Object {
- "end": Object {
+ "position": {
+ "end": {
"column": 4,
"line": 25,
"offset": 217,
},
- "start": Object {
+ "start": {
"column": 1,
"line": 23,
"offset": 195,
@@ -258,16 +258,16 @@ Object {
"type": "code",
"value": "// test code",
},
- Object {
- "children": Array [
- Object {
- "position": Object {
- "end": Object {
+ {
+ "children": [
+ {
+ "position": {
+ "end": {
"column": 18,
"line": 27,
"offset": 236,
},
- "start": Object {
+ "start": {
"column": 1,
"line": 27,
"offset": 219,
@@ -276,14 +276,14 @@ Object {
"type": "text",
"value": "Second hint with ",
},
- Object {
- "position": Object {
- "end": Object {
+ {
+ "position": {
+ "end": {
"column": 24,
"line": 27,
"offset": 242,
},
- "start": Object {
+ "start": {
"column": 18,
"line": 27,
"offset": 236,
@@ -292,14 +292,14 @@ Object {
"type": "html",
"value": "",
},
- Object {
- "position": Object {
- "end": Object {
+ {
+ "position": {
+ "end": {
"column": 28,
"line": 27,
"offset": 246,
},
- "start": Object {
+ "start": {
"column": 24,
"line": 27,
"offset": 242,
@@ -308,14 +308,14 @@ Object {
"type": "text",
"value": "code",
},
- Object {
- "position": Object {
- "end": Object {
+ {
+ "position": {
+ "end": {
"column": 35,
"line": 27,
"offset": 253,
},
- "start": Object {
+ "start": {
"column": 28,
"line": 27,
"offset": 246,
@@ -325,13 +325,13 @@ Object {
"value": "",
},
],
- "position": Object {
- "end": Object {
+ "position": {
+ "end": {
"column": 35,
"line": 27,
"offset": 253,
},
- "start": Object {
+ "start": {
"column": 1,
"line": 27,
"offset": 219,
@@ -339,16 +339,16 @@ Object {
},
"type": "paragraph",
},
- Object {
+ {
"lang": "js",
"meta": null,
- "position": Object {
- "end": Object {
+ "position": {
+ "end": {
"column": 4,
"line": 31,
"offset": 282,
},
- "start": Object {
+ "start": {
"column": 1,
"line": 29,
"offset": 255,
@@ -357,16 +357,16 @@ Object {
"type": "code",
"value": "// more test code",
},
- Object {
- "children": Array [
- Object {
- "position": Object {
- "end": Object {
+ {
+ "children": [
+ {
+ "position": {
+ "end": {
"column": 11,
"line": 34,
"offset": 295,
},
- "start": Object {
+ "start": {
"column": 3,
"line": 34,
"offset": 287,
@@ -377,13 +377,13 @@ Object {
},
],
"depth": 1,
- "position": Object {
- "end": Object {
+ "position": {
+ "end": {
"column": 11,
"line": 34,
"offset": 295,
},
- "start": Object {
+ "start": {
"column": 1,
"line": 34,
"offset": 285,
@@ -391,16 +391,16 @@ Object {
},
"type": "heading",
},
- Object {
- "children": Array [
- Object {
- "position": Object {
- "end": Object {
+ {
+ "children": [
+ {
+ "position": {
+ "end": {
"column": 21,
"line": 36,
"offset": 317,
},
- "start": Object {
+ "start": {
"column": 4,
"line": 36,
"offset": 300,
@@ -411,13 +411,13 @@ Object {
},
],
"depth": 2,
- "position": Object {
- "end": Object {
+ "position": {
+ "end": {
"column": 21,
"line": 36,
"offset": 317,
},
- "start": Object {
+ "start": {
"column": 1,
"line": 36,
"offset": 297,
@@ -425,16 +425,16 @@ Object {
},
"type": "heading",
},
- Object {
+ {
"lang": "html",
"meta": null,
- "position": Object {
- "end": Object {
+ "position": {
+ "end": {
"column": 4,
"line": 43,
"offset": 364,
},
- "start": Object {
+ "start": {
"column": 1,
"line": 38,
"offset": 319,
@@ -446,16 +446,16 @@ Object {
",
},
- Object {
+ {
"lang": "css",
"meta": null,
- "position": Object {
- "end": Object {
+ "position": {
+ "end": {
"column": 4,
"line": 49,
"offset": 406,
},
- "start": Object {
+ "start": {
"column": 1,
"line": 45,
"offset": 366,
@@ -466,17 +466,17 @@ Object {
background: green;
}",
},
- Object {
- "children": Array [
- Object {
+ {
+ "children": [
+ {
"alt": "custom-name",
- "position": Object {
- "end": Object {
+ "position": {
+ "end": {
"column": 17,
"line": 51,
"offset": 424,
},
- "start": Object {
+ "start": {
"column": 1,
"line": 51,
"offset": 408,
@@ -487,13 +487,13 @@ Object {
"url": "",
},
],
- "position": Object {
- "end": Object {
+ "position": {
+ "end": {
"column": 17,
"line": 51,
"offset": 424,
},
- "start": Object {
+ "start": {
"column": 1,
"line": 51,
"offset": 408,
@@ -501,16 +501,16 @@ Object {
},
"type": "paragraph",
},
- Object {
+ {
"lang": "js",
"meta": null,
- "position": Object {
- "end": Object {
+ "position": {
+ "end": {
"column": 4,
"line": 55,
"offset": 448,
},
- "start": Object {
+ "start": {
"column": 1,
"line": 53,
"offset": 426,
@@ -519,16 +519,16 @@ Object {
"type": "code",
"value": "var x = 'y';",
},
- Object {
+ {
"lang": "js",
"meta": null,
- "position": Object {
- "end": Object {
+ "position": {
+ "end": {
"column": 4,
"line": 6,
"offset": 125,
},
- "start": Object {
+ "start": {
"column": 1,
"line": 1,
"offset": 0,
@@ -541,13 +541,13 @@ Object {
}",
},
],
- "position": Object {
- "end": Object {
+ "position": {
+ "end": {
"column": 1,
"line": 58,
"offset": 476,
},
- "start": Object {
+ "start": {
"column": 1,
"line": 1,
"offset": 0,
diff --git a/tools/challenge-parser/parser/plugins/utils/__snapshots__/between-headings.test.js.snap b/tools/challenge-parser/parser/plugins/utils/__snapshots__/between-headings.test.js.snap
index a837dae526e..e7c1b54d6f4 100644
--- a/tools/challenge-parser/parser/plugins/utils/__snapshots__/between-headings.test.js.snap
+++ b/tools/challenge-parser/parser/plugins/utils/__snapshots__/between-headings.test.js.snap
@@ -1,17 +1,17 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`between-headings should match the hints snapshot 1`] = `
-Array [
- Object {
- "children": Array [
- Object {
- "position": Object {
- "end": Object {
+[
+ {
+ "children": [
+ {
+ "position": {
+ "end": {
"column": 11,
"line": 19,
"offset": 142,
},
- "start": Object {
+ "start": {
"column": 1,
"line": 19,
"offset": 132,
@@ -21,13 +21,13 @@ Array [
"value": "First hint",
},
],
- "position": Object {
- "end": Object {
+ "position": {
+ "end": {
"column": 11,
"line": 19,
"offset": 142,
},
- "start": Object {
+ "start": {
"column": 1,
"line": 19,
"offset": 132,
@@ -35,16 +35,16 @@ Array [
},
"type": "paragraph",
},
- Object {
+ {
"lang": "js",
"meta": null,
- "position": Object {
- "end": Object {
+ "position": {
+ "end": {
"column": 4,
"line": 23,
"offset": 166,
},
- "start": Object {
+ "start": {
"column": 1,
"line": 21,
"offset": 144,
@@ -53,16 +53,16 @@ Array [
"type": "code",
"value": "// test code",
},
- Object {
- "children": Array [
- Object {
- "position": Object {
- "end": Object {
+ {
+ "children": [
+ {
+ "position": {
+ "end": {
"column": 18,
"line": 25,
"offset": 185,
},
- "start": Object {
+ "start": {
"column": 1,
"line": 25,
"offset": 168,
@@ -71,14 +71,14 @@ Array [
"type": "text",
"value": "Second hint with ",
},
- Object {
- "position": Object {
- "end": Object {
+ {
+ "position": {
+ "end": {
"column": 24,
"line": 25,
"offset": 191,
},
- "start": Object {
+ "start": {
"column": 18,
"line": 25,
"offset": 185,
@@ -87,14 +87,14 @@ Array [
"type": "html",
"value": "",
},
- Object {
- "position": Object {
- "end": Object {
+ {
+ "position": {
+ "end": {
"column": 28,
"line": 25,
"offset": 195,
},
- "start": Object {
+ "start": {
"column": 24,
"line": 25,
"offset": 191,
@@ -103,14 +103,14 @@ Array [
"type": "text",
"value": "code",
},
- Object {
- "position": Object {
- "end": Object {
+ {
+ "position": {
+ "end": {
"column": 35,
"line": 25,
"offset": 202,
},
- "start": Object {
+ "start": {
"column": 28,
"line": 25,
"offset": 195,
@@ -120,13 +120,13 @@ Array [
"value": "",
},
],
- "position": Object {
- "end": Object {
+ "position": {
+ "end": {
"column": 35,
"line": 25,
"offset": 202,
},
- "start": Object {
+ "start": {
"column": 1,
"line": 25,
"offset": 168,
@@ -134,16 +134,16 @@ Array [
},
"type": "paragraph",
},
- Object {
+ {
"lang": "js",
"meta": null,
- "position": Object {
- "end": Object {
+ "position": {
+ "end": {
"column": 4,
"line": 29,
"offset": 231,
},
- "start": Object {
+ "start": {
"column": 1,
"line": 27,
"offset": 204,
@@ -152,16 +152,16 @@ Array [
"type": "code",
"value": "// more test code",
},
- Object {
- "children": Array [
- Object {
- "position": Object {
- "end": Object {
+ {
+ "children": [
+ {
+ "position": {
+ "end": {
"column": 7,
"line": 31,
"offset": 239,
},
- "start": Object {
+ "start": {
"column": 1,
"line": 31,
"offset": 233,
@@ -170,16 +170,16 @@ Array [
"type": "text",
"value": "Third ",
},
- Object {
- "children": Array [
- Object {
- "position": Object {
- "end": Object {
+ {
+ "children": [
+ {
+ "position": {
+ "end": {
"column": 12,
"line": 31,
"offset": 244,
},
- "start": Object {
+ "start": {
"column": 8,
"line": 31,
"offset": 240,
@@ -189,13 +189,13 @@ Array [
"value": "hint",
},
],
- "position": Object {
- "end": Object {
+ "position": {
+ "end": {
"column": 13,
"line": 31,
"offset": 245,
},
- "start": Object {
+ "start": {
"column": 7,
"line": 31,
"offset": 239,
@@ -203,14 +203,14 @@ Array [
},
"type": "emphasis",
},
- Object {
- "position": Object {
- "end": Object {
+ {
+ "position": {
+ "end": {
"column": 19,
"line": 31,
"offset": 251,
},
- "start": Object {
+ "start": {
"column": 13,
"line": 31,
"offset": 245,
@@ -219,14 +219,14 @@ Array [
"type": "text",
"value": " with ",
},
- Object {
- "position": Object {
- "end": Object {
+ {
+ "position": {
+ "end": {
"column": 25,
"line": 31,
"offset": 257,
},
- "start": Object {
+ "start": {
"column": 19,
"line": 31,
"offset": 251,
@@ -235,14 +235,14 @@ Array [
"type": "html",
"value": "",
},
- Object {
- "position": Object {
- "end": Object {
+ {
+ "position": {
+ "end": {
"column": 29,
"line": 31,
"offset": 261,
},
- "start": Object {
+ "start": {
"column": 25,
"line": 31,
"offset": 257,
@@ -251,14 +251,14 @@ Array [
"type": "text",
"value": "code",
},
- Object {
- "position": Object {
- "end": Object {
+ {
+ "position": {
+ "end": {
"column": 36,
"line": 31,
"offset": 268,
},
- "start": Object {
+ "start": {
"column": 29,
"line": 31,
"offset": 261,
@@ -267,14 +267,14 @@ Array [
"type": "html",
"value": "",
},
- Object {
- "position": Object {
- "end": Object {
+ {
+ "position": {
+ "end": {
"column": 41,
"line": 31,
"offset": 273,
},
- "start": Object {
+ "start": {
"column": 36,
"line": 31,
"offset": 268,
@@ -283,14 +283,14 @@ Array [
"type": "text",
"value": " and ",
},
- Object {
- "position": Object {
- "end": Object {
+ {
+ "position": {
+ "end": {
"column": 54,
"line": 31,
"offset": 286,
},
- "start": Object {
+ "start": {
"column": 41,
"line": 31,
"offset": 273,
@@ -300,13 +300,13 @@ Array [
"value": "inline code",
},
],
- "position": Object {
- "end": Object {
+ "position": {
+ "end": {
"column": 54,
"line": 31,
"offset": 286,
},
- "start": Object {
+ "start": {
"column": 1,
"line": 31,
"offset": 233,
@@ -314,16 +314,16 @@ Array [
},
"type": "paragraph",
},
- Object {
+ {
"lang": "js",
"meta": null,
- "position": Object {
- "end": Object {
+ "position": {
+ "end": {
"column": 4,
"line": 38,
"offset": 353,
},
- "start": Object {
+ "start": {
"column": 1,
"line": 33,
"offset": 288,
@@ -339,17 +339,17 @@ if(let x of xs) {
`;
exports[`between-headings should match the instructions snapshot 1`] = `
-Array [
- Object {
- "children": Array [
- Object {
- "position": Object {
- "end": Object {
+[
+ {
+ "children": [
+ {
+ "position": {
+ "end": {
"column": 12,
"line": 11,
"offset": 89,
},
- "start": Object {
+ "start": {
"column": 1,
"line": 11,
"offset": 78,
@@ -359,13 +359,13 @@ Array [
"value": "Paragraph 0",
},
],
- "position": Object {
- "end": Object {
+ "position": {
+ "end": {
"column": 12,
"line": 11,
"offset": 89,
},
- "start": Object {
+ "start": {
"column": 1,
"line": 11,
"offset": 78,
@@ -373,16 +373,16 @@ Array [
},
"type": "paragraph",
},
- Object {
+ {
"lang": "html",
"meta": null,
- "position": Object {
- "end": Object {
+ "position": {
+ "end": {
"column": 4,
"line": 15,
"offset": 117,
},
- "start": Object {
+ "start": {
"column": 1,
"line": 13,
"offset": 91,
diff --git a/tools/ui-components/package.json b/tools/ui-components/package.json
index 79107c4ef70..db2e41a22f6 100644
--- a/tools/ui-components/package.json
+++ b/tools/ui-components/package.json
@@ -42,7 +42,7 @@
"@storybook/react": "6.5.16",
"@testing-library/jest-dom": "5.16.5",
"@testing-library/react": "12.1.5",
- "@types/jest": "27.5.2",
+ "@types/jest": "29.5.0",
"@types/react": "16.14.35",
"@types/react-dom": "^16.9.17",
"@types/testing-library__jest-dom": "^5",