-
Notifications
You must be signed in to change notification settings - Fork 475
/
Copy pathgetCommand.spec.ts
25 lines (24 loc) · 1.06 KB
/
getCommand.spec.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import { it, describe, expect } from 'vitest'
import getCommand from '../utils/getCommand'
describe('getCommand', () => {
it('should generate the correct command for yarn', () => {
expect(getCommand('yarn', 'install')).toBe('yarn')
expect(getCommand('yarn', 'dev')).toBe('yarn dev')
expect(getCommand('yarn', 'build')).toBe('yarn build')
})
it('should generate the correct command for npm', () => {
expect(getCommand('npm', 'install')).toBe('npm install')
expect(getCommand('npm', 'dev')).toBe('npm run dev')
expect(getCommand('npm', 'build')).toBe('npm run build')
})
it('should generate the correct command for pnpm', () => {
expect(getCommand('pnpm', 'install')).toBe('pnpm install')
expect(getCommand('pnpm', 'dev')).toBe('pnpm dev')
expect(getCommand('pnpm', 'build')).toBe('pnpm build')
})
it('should generate the correct command for bun', () => {
expect(getCommand('bun', 'install')).toBe('bun install')
expect(getCommand('bun', 'dev')).toBe('bun dev')
expect(getCommand('bun', 'build')).toBe('bun run build')
})
})