Skip to content

Commit 9d28b62

Browse files
committed
fix tests
1 parent 28b08c4 commit 9d28b62

File tree

12 files changed

+29
-4
lines changed

12 files changed

+29
-4
lines changed

exercises/01.expressions-and-output/01.problem.hello-world/README.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,5 @@ console.log("Double quotes work too")
2929

3030
🐨 Once you've completed the exercise, run `node index.ts` in the playground to
3131
see your output!
32+
33+
<link rel="stylesheet" href="/disable-code-backticks.css" />

exercises/01.expressions-and-output/01.solution.hello-world/README.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@ confused about what a value is, just log it!
88
🦉 Notice that strings can use either single quotes (`'`) or double quotes
99
(`"`). In this workshop, we'll use single quotes, but both work almost
1010
identically.
11+
12+
<link rel="stylesheet" href="/disable-code-backticks.css" />

exercises/01.expressions-and-output/02.problem.escaping-strings/README.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,5 @@ console.log('Name:\tKody') // Prints with a tab between
5050
`\n` for newlines, and `\t` for tabs!
5151

5252
📜 [Escape sequences on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#escape_sequences)
53+
54+
<link rel="stylesheet" href="/disable-code-backticks.css" />

exercises/01.expressions-and-output/02.solution.escaping-strings/README.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@
66
news is that there's another way to create strings which we'll cover soon:
77
**template literals** (using backticks). They make many of these escaping issues
88
disappear and even let you write actual multi-line strings without `\n`!
9+
10+
<link rel="stylesheet" href="/disable-code-backticks.css" />

exercises/01.expressions-and-output/03.problem.strings/README.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,5 @@ strings exactly as they are!
2525
because you can write this more easily without it. The tests for this step
2626
check for `+` concatenation, so avoid template literals here.
2727
</callout-warning>
28+
29+
<link rel="stylesheet" href="/disable-code-backticks.css" />

exercises/01.expressions-and-output/03.solution.strings/README.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@
55
🦉 While `+` works for joining strings, it can get tedious when you have many
66
parts. Later in this exercise, we'll learn about **template literals** which
77
make this much easier!
8+
9+
<link rel="stylesheet" href="/disable-code-backticks.css" />

exercises/01.expressions-and-output/04.problem.numbers/README.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,5 @@ a complete list in the
3030

3131
💰 You can use parentheses to control the order of operations, just like in
3232
regular math!
33+
34+
<link rel="stylesheet" href="/disable-code-backticks.css" />

exercises/01.expressions-and-output/04.solution.numbers/README.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@
55
🦉 JavaScript evaluates expressions from left to right, following standard math
66
order of operations (multiplication and division before addition and
77
subtraction). When in doubt, use parentheses to be explicit about what you want.
8+
9+
<link rel="stylesheet" href="/disable-code-backticks.css" />

exercises/01.expressions-and-output/04.solution.numbers/index.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,28 +26,28 @@ const lines = output
2626

2727
await test('should print 42', () => {
2828
assert.ok(
29-
lines.includes('42'),
29+
lines.some((line) => line.includes('42')),
3030
'🚨 Output should include 42 (the result of 25 + 17)',
3131
)
3232
})
3333

3434
await test('should print 48', () => {
3535
assert.ok(
36-
lines.includes('48'),
36+
lines.some((line) => line.includes('48')),
3737
'🚨 Output should include 48 (the result of 8 * 6)',
3838
)
3939
})
4040

4141
await test('should print 25', () => {
4242
assert.ok(
43-
lines.includes('25'),
43+
lines.some((line) => line.includes('25')),
4444
'🚨 Output should include 25 (the result of 100 / 4)',
4545
)
4646
})
4747

4848
await test('should print 30', () => {
4949
assert.ok(
50-
lines.includes('30'),
50+
lines.some((line) => line.includes('30')),
5151
'🚨 Output should include 30 (the result of (10 + 5) * 2)',
5252
)
5353
})

exercises/01.expressions-and-output/05.problem.template-literals/README.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,5 @@ console.log(`Hello, ${'World'}!`) // Prints: Hello, World!
3333
3. Log a math problem and its answer, like "10 times 5 equals 50"
3434

3535
💰 The backtick key is usually in the top-left of your keyboard, below Escape.
36+
37+
<link rel="stylesheet" href="/disable-code-backticks.css" />

0 commit comments

Comments
 (0)