@eluvio/elv-js-helpers
Version:
A collection of Javascript helper functions used by several Eluvio libraries.
19 lines (17 loc) • 607 B
JavaScript
// AUTO-GENERATED TEST - DO NOT MODIFY, CHANGES WILL BE OVERWRITTEN DURING BUILD
const TH = require('../../../test-helpers')
const isGeneratorFunction = TH.requireSrcFile('Boolean/isGeneratorFunction')
describe('isGeneratorFunction JSDoc example', () => {
it('should execute correctly as described', () => {
'use strict'
function* numbersUpTo(x) {
for (let i = 0; i < x; i++) {
yield i
}
}
isGeneratorFunction(numbersUpTo).should.eql(true)
isGeneratorFunction(Math.round).should.eql(false)
isGeneratorFunction(undefined).should.eql(false)
})
})