Skip to content

Commit d96fc2b

Browse files
disableGrading set to true
1 parent 5b1f0c7 commit d96fc2b

File tree

2 files changed

+6
-20
lines changed

2 files changed

+6
-20
lines changed

exercises/07-Very-Specific-Rules/tests.js

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@ describe("All the styles should be applied", function () {
99
beforeEach(() => {
1010
//here I import the HTML into the document
1111
document.documentElement.innerHTML=html.toString();
12-
1312
//apply the styles from the stylesheet if needed
14-
1513
});
1614
afterEach(() => {
1715
jest.resetModules();
@@ -23,18 +21,13 @@ describe("All the styles should be applied", function () {
2321
"head"
2422
).innerHTML=`<style>${css.toString()}</style>`;
2523
let cssArray=document.styleSheets[0].cssRules;
26-
2724
let orangeHoverSelector="";
2825
for (let i=0; i<cssArray.length; i++) {
29-
30-
if (cssArray[i].selectorText==="ul li" | cssArray[i].selectorText==="ul > li") {
26+
if (cssArray[i].selectorText==="ul li" || cssArray[i].selectorText==="ul > li") {
3127
orangeHoverSelector=cssArray[i].style.color;
32-
3328
}
3429
expect(orangeHoverSelector).toBe("red");
3530
}
36-
37-
3831
});
3932
it("The ul second element background should be green", function () {
4033
document.querySelector(
@@ -44,7 +37,7 @@ describe("All the styles should be applied", function () {
4437

4538
let orangeHoverSelector="";
4639
for (let i=0; i<cssArray.length; i++) {
47-
if (cssArray[i].selectorText==="ol li:nth-child(2)" | cssArray[i].selectorText==="ol > li:nth-child(2)" ) {
40+
if (cssArray[i].selectorText==="ol li:nth-child(2)" || cssArray[i].selectorText==="ol > li:nth-child(2)" ) {
4841
orangeHoverSelector=cssArray[i].style['background-color'];
4942

5043
}
@@ -90,9 +83,4 @@ describe("All the styles should be applied", function () {
9083
let title = head.querySelector('title')
9184
expect(title).not.toBe(null)
9285
})
93-
94-
95-
96-
97-
9886
});

learn.json

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,8 @@
1111
"difficulty": "easy",
1212
"video-solutions": true,
1313
"graded": true,
14-
15-
"disableGrading": false,
16-
"editor": {
17-
"version": "1.0.73"
18-
}
19-
14+
"disableGrading": false,
15+
"editor": {
16+
"version": "1.0.73"
17+
}
2018
}

0 commit comments

Comments
 (0)