Note: This site is currently "Under construction". I'm migrating to a new version of my site building software. Lots of things are in a state of disrepair as a result (for example, footnote links aren't working). It's all part of the process of building in public. Most things should still be readable though.

Create A New Node Project With npm init

New node projects can be started by running this in the directory you want to make the project in.

Code

npm init

That will walk you through a set of questions and setup the package.json file.

The initialization asks for a license, I don't see how to tell it "None" so I just put in the default and then move it to None in the package.json file after it's created.

Install Jest with:

Code

npm install --save-dev jest

Here's how to get started with jest:

https://jestjs.io/docs/getting-started