Skip to content

Commit 0282a83

Browse files
update 22 & 23 to use .html()
1 parent 5bc4e8e commit 0282a83

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/challenges/react/React_22.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,7 @@ export const executeTests = (code, errorSuppression) => {
139139
// test 2:
140140
try {
141141
assert(
142-
mockedComponent.children().type() === 'div' &&
143-
mockedComponent.children().children().type() === 'h1',
142+
/<div><h1>.*<\/h1><\/div>/.test(mockedComponent.html()),
144143
error_2
145144
);
146145
testResults[2].status = true;

src/challenges/react/React_23.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,7 @@ export const executeTests = (code, errorSuppression) => {
142142
// test 2:
143143
try {
144144
assert(
145-
mockedComponent.children().type() === 'div' &&
146-
mockedComponent.children().children().type() === 'h1',
145+
/<div><h1>.*<\/h1><\/div>/.test(mockedComponent.html()),
147146
error_2
148147
);
149148
testResults[2].status = true;

0 commit comments

Comments
 (0)