Recipe to test your ES6 React components.
$ npm install gulp gulp-util gulp-mocha gulp-istanbul isparta run-sequence babel jsdomNote: You must name all your files .js, even if they contains JSX, or istanbul will not instrument them.
| 'use strict'; | |
| const CypherQuery = require('./cypher').CypherQuery; | |
| module.exports = function createQueryExecutor(context) { | |
| const executor = function executeQuery(query) { | |
| if (typeof query === 'function') { | |
| return query(executor); | |
| } |