| @@ -4,7 +4,7 @@ | |||
| "description": "A Fo-terminal-like website hosting system.", | |||
| "main": "wwwterm.js", | |||
| "scripts": { | |||
| "test": "echo \"Error: no test specified\" && exit 1" | |||
| "test": "mocha" | |||
| }, | |||
| "author": "Bryan Miller", | |||
| "license": "ISC", | |||
| @@ -15,5 +15,10 @@ | |||
| "ejs": "2.6.2", | |||
| "express": "4.17.1", | |||
| "sass": "1.22.7" | |||
| }, | |||
| "devDependencies": { | |||
| "chai": "^4.2.0", | |||
| "mocha": "^6.2.0", | |||
| "sinon": "^7.3.2" | |||
| } | |||
| } | |||
| @@ -0,0 +1,13 @@ | |||
| // NOTE: Idea for this file comes from https://blog.risingstack.com/node-hero-node-js-unit-testing-tutorial/ | |||
| const sinon = require('sinon'); | |||
| const chai = require('chai'); | |||
| beforeEach(function(){ | |||
| this.sandbox = sinon.sandbox.create(); | |||
| }) | |||
| afterEach(function(){ | |||
| this.sandbox.restore(); | |||
| }); | |||