import * as through from 'through2'
import { sizer } from '../../gulpfile.ts/lib/sizer'

jest.mock('path')
jest.mock('through2')

describe('sizer', () => {
  it('should return a stream', () => {
    const spyObj: any = jest.spyOn(through, 'obj')
    spyObj.mockReturnValue({ hello: 1 })
    const result = sizer({
      fallbackCwd: '123',
    })
    expect(spyObj).toHaveBeenCalled()
    expect(result).toMatchObject({ hello: 1 })
  })
})
