function invoke (type, opts) {
  testedKeys.push(type)

  it(type + ': key is set on raw and ()', () => {
    const dt = DataTypes[type]
    expect(dt.key).to.equal(type)
    expect(dt(opts).key).to.equal(type)
  })

  if (opts) {
    opts.forEach(opt => {
      let key = ''
      for (let k in opt) key = k

      it(`${type}: can invoke with option (${key}:${opt[key]})`, () => {
        const out = DataTypes[type](opt[key])
        expect(out[key]).to.equal(opt[key])
      })
    })
  }
}
/**
  DataTypes use a common structure, with some minor parameter tweaks.
  The following are common tests that apply to all DataTypes.

  @param {String} type The uppercase TYPE to test
  @param {Object[]} opts Array of {field: paramVal} to pass to TYPE()
*/
DataTypes use a common structure, with some minor parameter tweaks.
The following are common tests that apply to all DataTypes.
DataTypes use a common structure with some minor parameter tweaks . The following are common tests that apply to all DataTypes .
function invoke (type, opts) {
  testedKeys.push(type)
  it(type + ': key is set on raw and ()', () => {
    const dt = DataTypes[type]
    expect(dt.key).to.equal(type)
    expect(dt(opts).key).to.equal(type)
  })
  if (opts) {
    opts.forEach(opt => {
      let key = ''
      for (let k in opt) key = k
      it(`${type}: can invoke with option (${key}:${opt[key]})`, () => {
        const out = DataTypes[type](opt[key])
        expect(out[key]).to.equal(opt[key])
      })
    })
  }
}
function invoke ( type , opts ) { testedKeys . push ( type ) it ( type + ': key is set on raw and ()' , ( ) => { const dt = DataTypes [ type ] expect ( dt . key ) . to . equal ( type ) expect ( dt ( opts ) . key ) . to . equal ( type ) } ) if ( opts ) { opts . forEach ( opt => { let key = '' for ( let k in opt ) key = k it ( ` ${ type } ${ key } ${ opt [ key ] } ` , ( ) => { const out = DataTypes [ type ] ( opt [ key ] ) expect ( out [ key ] ) . to . equal ( opt [ key ] ) } ) } ) } }
DataTypes use a common structure, with some minor parameter tweaks.
DataTypes use a common structure with some minor parameter tweaks .