How To Unit Testing JavaScript

preview_player
Показать описание
Your first greenbar in JavaScript / Nashorn

Рекомендации по теме
Комментарии
Автор

To be a bit more precise: module.exports is not needed because of the unit tests alone. It just makes it possible for node's module loader to inject the element you export :)

noherczeg
Автор

Dose that test fail because you use the wrong function name from the main class? the expected behavior is for the test is to fail but do we know why it's failing.
This was a great tutorial to get started, I joust came from a ytube-lecture from Roy Osherove talking about TDD and I need to get started with this, it seems fun =)

paega
Автор

I have followed all the instructions but I get an error:

run:
test.js:6 ReferenceError: "require" is not defined
Java returned: 102
BUILD FAILED (total time: 1 second)

How can I fix it? I need help.

sukhanu
visit shbcf.ru