@eluvio/elv-js-helpers
Version:
A collection of Javascript helper functions used by several Eluvio libraries.
17 lines (15 loc) • 661 B
JavaScript
// AUTO-GENERATED TEST - DO NOT MODIFY, CHANGES WILL BE OVERWRITTEN DURING BUILD
const TH = require('../../../test-helpers')
const conditionalCheck = TH.requireSrcFile('Boolean/conditionalCheck')
describe('conditionalCheck JSDoc example', () => {
it('should execute correctly as described', () => {
'use strict'
const isString = TH.requireSrcFile('Boolean/isString')
const stringStartsWithF = conditionalCheck(isString, x => x.startsWith('f'))
// Skip assertion, value is not a string:
stringStartsWithF(1).should.eql(true)
stringStartsWithF('foo').should.eql(true)
stringStartsWithF('bar').should.eql(false)
})
})