This framework was put together in order to help me better understand how testing wokrs in JavaScript. I Do NOT recommend ANYBODY use Nymeria for testing prodcution code!!
Now since that's out of the way, how do you use Nymeria to test your code??
Well as of now it's a long and complicated process, BUT... Like this:
npm i @gnarwall19/nymeria --save-dev
- Create your own
tests
folder in your applications source folder - In your
tests
folder, create anindex.js
file that:- has a variable called nymeria that requires '@gnarwall19/nymeria'
- Requires your
whatever.test.js
files - Finishes with
nymeria.end()
to run the exit code
- Write all the tests you want in your .test.js files just make sure you require them in
index.js
! - Run
node tests
from your projects source in the terminal/command prompt
- Make sure your tests folder has an
index.js
file that:- Requires nymeria as a const
- Requires your
whatever.test.js
files - Finishes with
nymeria.end()
to run the exit code
Whatever.test.js
files need to require{ guarantee, check, xcheck, group }
as a const from nymeria- Check out the playground folder for some examples!
Again, credit for this project must be given to Alcides Queiroz for putting together an awesome tutorial! read the medium article here