Real unit test (isolation, no children render)
Calls:
- constructor
- render
// Future versions of Hyper may add additional config options, | |
// which will not automatically be merged into this file. | |
// See https://hyper.is#cfg for all currently supported options. | |
module.exports = { | |
config: { | |
// Choose either "stable" for receiving highly polished, | |
// or "canary" for less polished but more frequent updates | |
updateChannel: 'stable', |
var dbName = 'http://localhost:5984/couch-test', | |
nDocs = 10000, | |
batchSize = 1000, | |
scrapFactor = 0, | |
docs = [], | |
testQuery = 'entries/sumTime', | |
destroyDb = false, | |
_log = console.log, | |
db; |
const pipe = (…functions) => input => functions.reduce((chain, func) => chain.then(func), Promise.resolve(input)); | |
// Functions fn1, fn2, fn3 can be standard synchronous functions or return a Promise | |
pipe(fn1, fn2, fn3)(input).then(result => console.log(`Do with the ${result} as you please`)) |
// Async compose | |
const compose = (…functions) => input => functions.reduceRight((chain, func) => chain.then(func), Promise.resolve(input)); | |
// Functions fn1, fn2, fn3 can be standard synchronous functions or return a Promise | |
compose(fn3, fn2, fn1)(input).then(result => console.log(`Do with the ${result} as you please`)) |
/*! | |
* Copyright 2014 jQuery Foundation and other contributors | |
* Released under the MIT license. | |
*/ | |
/** | |
* Better Element.scrollIntoView() implementation | |
* | |
* @see https://github.com/jquery/jquery-ui/blob/master/ui/menu.js#L409-L425 | |
* |
// # Mocha Guide to Testing | |
// Objective is to explain describe(), it(), and before()/etc hooks | |
// 1. `describe()` is merely for grouping, which you can nest as deep | |
// 2. `it()` is a test case | |
// 3. `before()`, `beforeEach()`, `after()`, `afterEach()` are hooks to run | |
// before/after first/each it() or describe(). | |
// | |
// Which means, `before()` is run before first it()/describe() |