jest.unmock('chalk')

import { pathToUrl } from '../../gulpfile.ts/lib/utils'

describe('lib', () => {
  describe('pathToUrl', () => {
    it('should return a path for one argument', () => {
      expect(pathToUrl('hello')).toEqual('hello')
    })
    it('should return a path for multiple arguments', () => {
      expect(pathToUrl('hello', 'hello')).toEqual('hello/hello')
    })

    it('should replace forward slashes with backslashes', () => {
      expect(pathToUrl('hello\\me', 'hello')).toEqual('hello/me/hello')
    })
  })
})
