0.0.15 • Published 3 years ago
spiced-test v0.0.15
spiced-test
Given you have your implementation in a file named script.js
, you can run the tests with npx spiced-test@latest <exercise> script.js
(replace <exercise>
with name of exercise, see below)
Your implementation passed the test, if you see the following output:
ᕙ(◕ل͜◕)ᕗ - OK - 🥳🥳🥳
If your implementation fails the test, you will get an descriptive error message, like:
countdown must not log number 11
Troubleshoot
- What does
Test for exercise 'countown' does not exist.
mean?- This means we don't have tests for the given exercise
countown
yet. - Most probably, you have a typo in the name of the exercise. Please check for the correct name to run the tests for a given exercise below.
- This means we don't have tests for the given exercise
- What does
ENOENT: no such file or directory, open 'index.js'
mean?- This means that a file with ne name
index.js
does not exists on your machine in the current folder. - Most probably you either mispelled the name of the file (please doublecheck), or
- the file you want to test lives in another directory. Doublecheck your current working directory with
pwd
and the files in that folder withls
. If you are not in the correct folder, first navigate to the correct folder usingcd
, then run the test command again.
- This means that a file with ne name
Exercises
Control Flow (Week 1, Day 2)
npx spiced-test@latest logType script.js
- make sure to name your function
logType
- make sure to name your function
npx spiced-test@latest objectABBA script.js
- make sure to name your new object
b
- make sure to name your new object
npx spiced-test@latest countdown script.js
Functions and Scope (Week 1, Day 3)
npx spiced-test@latest sum script.js
- make sure to name your function
sum
- make sure to name your function
npx spiced-test@latest waitThenRun script.js
- make sure to name your function
waitThenRun
- make sure to name your function
npx spiced-test@latest increaseOrderOfMagnitude script.js
- make sure to name your function
increaseOrderOfMagnitude
- make sure to name your function
npx spiced-test@latest getTotaler script.js
- make sure to name your function
getTotaler
- make sure to name your function
Arrays/Objects (Week 1, Day 4)
npx spiced-test@latest each script.js
- make sure to name your function
each
- make sure to name your function
npx spiced-test@latest reverse script.js
- make sure to name your function
reverse
- make sure to name your function
npx spiced-test@latest getLessThanZero script.js
- make sure to name your function
getLessThanZero
- make sure to name your function
Constructors and Prototypes / this (Week 1, Day 5)
npx spiced-test@latest Rectangle script.js
- make sure to name your constructor function
Rectangle
- make sure to name your constructor function
npx spiced-test@latest invertCase script.js
- make sure to name your function
invertCase
- make sure to name your function
npx spiced-test@latest CountdownBonus script.js
- make sure to name your constructor function
Countdown
- make sure to name your constructor function
try...catch (Week 3, Day 3)
npx spiced-test@latest translateNumberToGerman script.js
- make sure to name your function
translateNumberToGerman
- make sure to name your function
Generator Functions (Week 4, Day 3)
npx spiced-test@latest fizzBuzz script.js
- make sure to name your generator function
fizzBuzz
- make sure to name your generator function
npx spiced-test@latest generatorExer2 script.js
- make sure to name your generator function
generatorExer2
- make sure to name your generator function
npx spiced-test@latest makeWeirdArray script.js
- make sure to name your function
makeWeirdArray
- make sure to name your function