Tuesday 11 April 2017

Help with unit testing.

I am learning how to unit test on my own and was wondering if someone can help me test this file? I have mocha and chai installed, but I'm not quite sure how to test the res.render part of the router.get function. Here is the codevar express = require('express'); var router = express.Router();/* GET users listing. */ router.get('/', function(req, res, next) { res.render('about', {title: 'About'}) });module.exports = router;

Submitted April 11, 2017 at 07:25PM by ObiJuanKanobe

No comments:

Post a Comment