mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-29 06:27:49 +00:00
Test documentation with markdown-doctest.
This commit is contained in:
committed by
John-David Dalton
parent
6c6e1c2be3
commit
ef1024bb60
53
.markdown-doctest-setup.js
Normal file
53
.markdown-doctest-setup.js
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user