Javascript | Node.js Flashcards
Setting up a Node.js project:
What is FS in node JS? E.g. when you declare this in the spec.helper.js file:
const fs = require(‘fs’);
The Node.js file system module allows you to work with the file system on your computer. To include the File System module, use the require() method: var fs = require(‘fs’);
Common use for the File System module:
Read files Create files Update files Delete files Rename files
Setting up a Node.js project:
What is Mocha? What is Node.js required with it?
Mocha is a JavaScript testing framework. It provides a lot of methods like describe, it, before, etc. to organise your tests. It provides both command line and programmatic utilities to execute the tests.
The Mocha test framework runs in a Node.js environment.