Skip to content

Commit ad931d0

Browse files
committed
Section 32: Verifying the Dropdown State
1 parent 78d2b71 commit ad931d0

2 files changed

Lines changed: 25 additions & 1 deletion

File tree

32-The-Basics-of-Testing/06-movies/test/autocomplete.test.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,12 @@ it('Shows an autocomplete', () => {
1212
return movie.Title
1313
}
1414
})
15+
16+
const dropdown = document.querySelector('.dropdown')
17+
18+
// no real, we don't have access to the assert library inside of the browser
19+
// assert.strictEquals(dropdown.className, 'dropdown')
20+
21+
// Mocha inside the browser
22+
1523
})

32-The-Basics-of-Testing/README.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,20 @@
2424

2525
## 5. 05 Fixing Three Issues
2626

27-
## 6. 06 The Assert Module
27+
## 6. 06 The Assert Module
28+
29+
## 7. 07 Using Mocha darle play
30+
31+
`npm run test index.test.js`
32+
33+
## 8. 08 App Setup
34+
35+
## 9. 11 Mocha in the Browser
36+
37+
## 10. 12 Displaying the Autocomplete
38+
39+
## 11. 13 Verifying the Dropdown State
40+
41+
#### Chai.js
42+
43+
Is what we call an expectation library or an assertion library is the library that allows us to use those same kind of assert statements that we saw at that node module.

0 commit comments

Comments
 (0)