UNPKG

@eluvio/elv-js-helpers

Version:

A collection of Javascript helper functions used by several Eluvio libraries.

16 lines (11 loc) 375 B
const TH = require('../../../test-helpers') const wrapNonArray = TH.requireSrcFile('Conversion/wrapNonArray') describe('wrapNonArray', () => { it('should wrap non-array values', () => { wrapNonArray(42).should.eql( [42]) }) it('should not wrap array values', () => { wrapNonArray([42]).should.eql( [42]) wrapNonArray([[42]]).should.eql( [[42]]) }) })