You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+13-17
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,4 @@
1
-
JavaScript Logging Lab
2
-
---
1
+
# JavaScript Logging Lab
3
2
4
3
## Objectives
5
4
@@ -24,7 +23,7 @@ On Learn, we use tests as teaching tools. Just like in a normal coding environme
24
23
25
24
The structure of this lab — where its files and folders are located — looks roughly like the following:
26
25
27
-
```shell
26
+
```
28
27
├── CONTRIBUTING.md
29
28
├── LICENSE.md
30
29
├── README.md
@@ -59,7 +58,7 @@ Now open up `test/index-test.js`. Hey, there's something! What's all of this stu
59
58
60
59
At the very top of the file, you'll see
61
60
62
-
```javascript
61
+
```js
63
62
constexpect=require('expect')
64
63
constfs=require('fs')
65
64
constjsdom=require('jsdom')
@@ -70,9 +69,8 @@ This might be a bit bewildering, but at this point, we don't need to be able to
70
69
71
70
In these first lines, all we're doing is referencing different _libraries_ that help us run your tests. A library is code that someone else (usually multiple someone elses) wrote for our use. Note that `require` won't work out of the box in the browser. We're actually running our tests in a different _environment_. (Remember the sandbox analogy from earlier? It's just like that.)
72
71
73
-
A little farther down the page, you'll see
74
-
75
-
```javascript
72
+
A little farther down the page, you'll see:
73
+
```js
76
74
describe('index', () => {
77
75
// there's stuff in here, too
78
76
})
@@ -82,7 +80,7 @@ describe('index', () => {
82
80
83
81
Then we have a few chunks like
84
82
85
-
```javascript
83
+
```js
86
84
it('calls console.error()', () => {
87
85
// this is where the tests are!
88
86
})
@@ -96,7 +94,7 @@ And that'll be great! These aren't like tests that we all took in school: they'r
96
94
97
95
In some of our tests, you'll see lines like the following:
0 commit comments