Skip to content

Commit 4a783a5

Browse files
committed
Section 33: Another Small Issue
1 parent 1b4b17e commit 4a783a5

2 files changed

Lines changed: 18 additions & 4 deletions

File tree

33-Building-a-Testing-Framework-From-Scratch/01-testme/samplewebproject/test/app.test.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,16 @@ it('has a text input', async () => {
1111
// }
1212

1313
assert(input)
14-
})
14+
})
15+
16+
it('shows a success message with a valid email', async () => {
17+
const dom = await render('index.html')
18+
const input = dom.window.document.querySelector('input')
19+
input.value = 'hello@hello.com'
20+
dom.window.document
21+
.querySelector('form')
22+
.dispatchEvent(new dom.window.Event('submit'))
23+
24+
const h1 = dom.window.document.querySelector('h1')
25+
console.log('Contents of h1', h1.innerHTML)
26+
})

33-Building-a-Testing-Framework-From-Scratch/README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
## 33-Building-a-Testing-Framework-From-Scratch
2+
23
**folder 01**
34

45
## 1. 01 Test Framework Requirements
@@ -8,8 +9,7 @@
89
- Must require very, very little setup
910
- Must be able to test a whole application, not just one little widget
1011
- CLI must have a 'watch mode' so we don't have to keep restarting it over and over
11-
- CLI must automatically find and run all files in our project that have a name of '*.test.js'
12-
12+
- CLI must automatically find and run all files in our project that have a name of '\*.test.js'
1313

1414
## 2. 02 Project Setup
1515

@@ -43,4 +43,6 @@ Terminal command: `testme`
4343

4444
## 15. 18 HTML Element Assertions
4545

46-
## 16. 19 An Incorrectly Passing Test
46+
## 16. 19 An Incorrectly Passing Test
47+
48+
## 17. 20 Another Small Issue

0 commit comments

Comments
 (0)