text: import { type } from './type'
  import { type as ramdaType } from 'ramda'
  
  test('with simple promise', () => {
    expect(type(Promise.resolve(1))).toBe('Promise')
  })
  
  test('with new Boolean', () => {
    expect(type(new Boolean(true))).toBe('Boolean')
  })
  
  test('with new String', () => {
    expect(type(new String('I am a String object'))).toEqual('String')
  })
  
  test('with new Number', () => {
    expect(type(new Number(1))).toBe('Number')
  })
  
  test('with new promise', () => {
    const delay = ms =>
      new Promise(resolve => {
        setTimeout(() => {
          resolve(ms + 110)
        }, ms)
      })
  
    expect(type(delay(10))).toEqual('Promise')
  })
  
  test('async function', () => {
    expect(type(async () => {})).toEqual('Async')
  })
  
  test('async arrow', () => {
    const asyncArrow = async () => {}
    expect(type(asyncArrow)).toBe('Async')
  })
  
  test('function', () => {
    const fn1 = () => {}
    const fn2 = function(){}
  
    function fn3(){}
  
    [ () => {}, fn1, fn2, fn3 ].map(val => {
      expect(type(val)).toEqual('Function')
    })
  })
  
  test('object', () => {
    expect(type({})).toEqual('Object')
  })
  
  test('number', () => {
    expect(type(1)).toEqual('Number')
  })
  
  test('boolean', () => {
    expect(type(false)).toEqual('Boolean')
  })
  
  test('string', () => {
    expect(type('foo')).toEqual('String')
  })
  
  test('null', () => {
    expect(type(null)).toEqual('Null')
  })
  
  test('array', () => {
    expect(type([])).toEqual('Array')
    expect(type([ 1, 2, 3 ])).toEqual('Array')
  })
  
  test('regex', () => {
    expect(type(/\s/g)).toEqual('RegExp')
  })
  
  test('undefined', () => {
    expect(type(undefined)).toEqual('Undefined')
  })
  
  test('not a number', () => {
    expect(type(Number('s'))).toBe('NaN')
  })
  
  test('function inside object 1', () => {
    const obj = {
      f(){
        return 4
      },
    }
  
    expect(type(obj.f)).toBe('Function')
    expect(ramdaType(obj.f)).toBe('Function')
  })
  
  test('function inside object 2', () => {
    const name = 'f'
    const obj = {
      [ name ](){
        return 4
      },
    }
    expect(type(obj.f)).toBe('Function')
    expect(ramdaType(obj.f)).toBe('Function')
  })
  