"What I cannot create, I do not understand."
-- Richard P. Feynman
This is a very simple implementation of a test runner, which helps to understand how it works under the hood. As you might guess, a lot of the features are missing and you can add most of them yourself.
Here are some of the links we've seen at the talk:
- Install bin files in PATH using npm
- Using npm link from a directory to work with the bin file globally
- Shebang interpreter directive
- Env shell command
- Chai assertion library
- Mocha test runner
- Test Anything Protocol
- Awesome list of Test Anything Protocol resources
- Node's EventEmitter
- Chalk - terminal string styling
- Symbols
- Emojis
Run the following commands from the terminal
npm install
npm test
Try to implement the following features under the current infrastructure.
before
/after
beforeEach
/afterEach
it.only
it.skip
Guidance
- Write the usage of the feature on the example project.
- Run
npm test
and let it fail. - Add the relevant global to the
rewireGlobals
function. - Add the new state under the constructor.
- Change the
run
function accordingly.
Good Luck! 😃
- How can i install the global
vanilla
command? - Usenpm link
from the main directory. - How can i remove the global
vanilla
command? - You can usenpm unlink
from the vanilla directory.