You will need to first get your environment set up. Follow the directions here
Katas are simple-ish problems that allow developers to discover the basics of a language, and get practice test-driving code. Some of the below katas may seems very simple and silly, but that's okay! Each kata can either be a separate folder or separate repo
In Node, it is a common practice for your code and tests to live in the same folder. I have opted to use jest as the test runner as it is fairly easy to use, and lighter weight than some other options. All of the code and tests live in the src
directory.
The following commands will be useful for running tests:
npm install
- Install any dependencies needed, such as Jestnpm install --save <package>
- Installs and saves a package. Useful for dependencies you may need, though probably not necessary for katas. Packages can be found at the npm registrynpm run test
- Executes all test files, single executionnpm run test:watch
- Executes all test files, automatically re-runs when a file is changed
Here is a descent tutorial that helps you understand, at a high-level, how git works. It includes the commands I have here, plus a few more. Don't worry about fetch, merge, or pull yet.
git add <file>
- Adds a specific file to git's "staged" filesget add .
- Adds all files in the current directory and all sub directories to git's "staged" filesgit commit -m "<message>"
- Creates a commit (aka snapshot) with all of the files in the staged area. This only affects your local machine until you push your code up. Your message should breifly describe your changegit push origin <branch>
- Pushes your commited changes to the remote server. In this case, it will be GitHub