1.0.2 • Published 6 years ago
@gnarwall19/nymeria v1.0.2
:wolf: Nymeria
A small but functional JavaScript testing framework
Built with lots of help from Alcides Queiroz's guide on Medium
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
- 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
CONSIDER THIS:
- 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 on github for some examples!
Example tests/index.js file
const nymeria = require('@gnarwall19/nymeria');
require('./cool-stuff.test');
require('./check-it-out.test');
require('./bad-naming-conventions.test');
require('./and-so-on.test');
nymeria.end();
Again, credit for this project must be given to Alcides Queiroz for putting together an awesome tutorial! read the medium article here