How does Jasmine test my code? How do I create a jasmine.json file? Learn how to install Jasmine into our project and configure it to run with the "npm test" command.
- [Instructor] Now it's time to talk about testing in OJS.…You remember when we originally created…this package dot J sound file?…We provided the command jasmine as our test command.…Well, let's go ahead and try that now,…if I go ahead and go over to the command prompt,…and type in the word NPM test,…it has no idea what that is.…So, let's go ahead and install jasmine now,…So, NPM install dash dash save dev jasmine.…
And now, if I type in jasmine,…well, it still doesn't know what it is,…because we didn't install it globally.…So, if we don't want to install globally,…we can type node modules dot bin slash jasmine.…And there no specs are found.…So, it's up to you, if you want to do the minus g,…you can use the global jasmine,…or if you just want it to be available locally,…we'll save dev just as jasmine.…So, I'm going to go ahead and take this command,…and replace what's in my package dot jsend folder…because I don't want to install it globally.…
I'm going to save that command,…and then let's go ahead, and in fact,…
Released
12/14/2018- Installing and publishing Node.js packages
- Defining classes in Node.js
- Building a web API with Express and Node.js
- Unit testing in Node.js
- Continuous integration
Share this video
Embed this video
Video: Installing Jasmine to test Node.js