Skip to content

Commit b66678f

Browse files
committed
Add third mini-quiz
1 parent 306d4b3 commit b66678f

File tree

5 files changed

+28
-46
lines changed

5 files changed

+28
-46
lines changed
Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,15 @@
11
{
2-
"question": "",
2+
"question": "What's the benefit of using the 'beforeEach()' code in 'tier-nft.test.js'?",
33
"options": [
44
{
5-
"answer": "",
6-
"correct": true
5+
"answer": "To speed up the execution of individual tests."
76
},
87
{
9-
"answer": ""
8+
"answer": "To combine multiple tests together for more concise code."
109
},
1110
{
12-
"answer": "",
11+
"answer": "To reuse contract deployment and setup code for all the tests.",
1312
"correct": true
14-
},
15-
{
16-
"answer": ""
17-
},
18-
{
19-
"answer": ""
2013
}
2114
]
2215
}
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
{
2-
"question": "",
2+
"question": "Why is it essential to ensure that tests fail before they pass?",
33
"options": [
44
{
5-
"answer": "",
6-
"correct": true
5+
"answer": "To verify that the test environment is set up correctly."
76
},
87
{
9-
"answer": ""
8+
"answer": "To identify potential bugs in the smart contract code.",
9+
"correct": true
1010
},
1111
{
12-
"answer": "",
13-
"correct": true
12+
"answer": "To make the process of writing tests faster and more efficient."
1413
},
1514
{
16-
"answer": ""
15+
"answer": "To confirm that the contract owner can withdraw funds."
1716
},
1817
{
19-
"answer": ""
18+
"answer": "To verify that the test is correctly checking the expected result.",
19+
"correct": true
2020
}
2121
]
2222
}
Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,18 @@
11
{
2-
"question": "",
2+
"question": "What is the purpose of 'await' in our tests?",
33
"options": [
44
{
5-
"answer": "",
6-
"correct": true
5+
"answer": "To pause the code execution until a condition is met."
76
},
87
{
9-
"answer": ""
8+
"answer": "To handle exceptions and errors in asynchronous code."
109
},
1110
{
12-
"answer": "",
13-
"correct": true
11+
"answer": "To run the code synchronously and improve performance."
1412
},
1513
{
16-
"answer": ""
17-
},
18-
{
19-
"answer": ""
14+
"answer": "To allow an asynchronous operation to finish executing and get its result, before continuing.",
15+
"correct": true
2016
}
2117
]
2218
}
Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,19 @@
11
{
2-
"question": "",
2+
"question": "In the context of testing, which roles does 'describe' play?",
33
"options": [
44
{
5-
"answer": "",
5+
"answer": "To create and define a new test case.",
66
"correct": true
77
},
88
{
9-
"answer": ""
10-
},
11-
{
12-
"answer": "",
9+
"answer": "To organize and group related tests together based on functionalities or components.",
1310
"correct": true
1411
},
1512
{
16-
"answer": ""
13+
"answer": "To handle asynchronous operations in the test suite."
1714
},
1815
{
19-
"answer": ""
16+
"answer": "To validate the correctness of the test results."
2017
}
2118
]
2219
}
Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,18 @@
11
{
2-
"question": "",
2+
"question": "What happens if any of the functions in the contract are broken?",
33
"options": [
44
{
5-
"answer": "",
6-
"correct": true
7-
},
8-
{
9-
"answer": ""
5+
"answer": "The contract becomes useless and cannot be deployed."
106
},
117
{
12-
"answer": "",
8+
"answer": "The contract may not be able to mint NFTs, render art correctly, or allow fund withdrawal.",
139
"correct": true
1410
},
1511
{
16-
"answer": ""
12+
"answer": "The contract owner loses their ownership privileges."
1713
},
1814
{
19-
"answer": ""
15+
"answer": "The contract gets automatically self-destructed."
2016
}
2117
]
2218
}

0 commit comments

Comments
 (0)