import * as path from 'path'
import * as internal from '../../gulpfile.ts/internal'
import { projectDestPath, projectSrcPath } from '../../gulpfile.ts/lib/configPath'

jest.mock('../../gulpfile.ts/internal')
jest.mock('path')

describe('projectSrcPath', () => {
  it('should prepend all paths with the src path', () => {
    const spyProjectPath = jest.spyOn(internal, 'projectPath')
    projectSrcPath('fake')
    expect(spyProjectPath).toHaveBeenCalledWith(internal.TIMPLA_CONFIG.src, 'fake')
  })
})

describe('projectDestPath', () => {
  it('should prepend all paths with the dest path', () => {
    const spyProjectPath = jest.spyOn(internal, 'projectPath')
    projectDestPath('fake')
    expect(spyProjectPath).toHaveBeenCalledWith(internal.TIMPLA_CONFIG.dest, 'fake')
  })
})
