UNPKG

timpla

Version:

An optimal website development experience for [server-side] web frameworks.

17 lines (15 loc) 482 B
import { isPackageInstalled } from '../../gulpfile.ts/lib/isPackageInstalled' jest.mock('../../gulpfile.ts/internal') describe('isPackageInstalled', () => { it('should return true if the supplied name exists', () => { const result = isPackageInstalled('hello') expect(result).toBeTruthy() }) it('should throw an error if the supplied name does not exist', () => { try { isPackageInstalled('wat') } catch (e) { expect(e).toBeTruthy() } }) })