Test documentation with markdown-doctest.

This commit is contained in:
Nick Johnstone
2016-04-29 19:27:51 +02:00
committed by John-David Dalton
parent 6c6e1c2be3
commit ef1024bb60
3 changed files with 62 additions and 7 deletions

View File

@@ -0,0 +1,53 @@
var _ = require(__dirname);
function jQuery () {
return {
on: function (ev, cb) {
cb()
}
}
}
jQuery.each = function (items, f) {
items.forEach(f)
}
module.exports = {
globals: {
'_': _,
asyncSave: _.noop,
addContactToList: _.noop,
calculateLayout: _.noop,
createApplication: _.noop,
updatePosition: _.noop,
sendMail: _.noop,
renewToken: _.noop,
batchLog: _.noop,
setImmediate: setImmediate,
Buffer: Buffer,
EventSource: function () {},
fs: {writeFileSync: _.noop},
path: {join: _.noop},
cwd: __dirname,
mainText: '',
data: {user: 'mock'},
document: {
body: {
childNodes: [],
nodeName: 'body'
}
},
jQuery: jQuery,
element: {},
window: {}
},
babel: false
}