1 Matching Annotations
- Mar 2019
-
codewithhugo.com codewithhugo.com
-
const sinon = require('sinon'); const mockResponse = () => { const res = {}; res.status = sinon.stub().returns(res); res.json = sinon.stub().returns(res); return res; };
Incredibly helpful in conjunction with Chris Esplin's tutorials [0] and code [1] on TDD with Cloud Functions.
[0] https://howtofirebase.com/test-driven-cloud-functions-fea53c64110c
-