-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathcodebuddy-catalog.test.ts
More file actions
28 lines (24 loc) · 1.05 KB
/
Copy pathcodebuddy-catalog.test.ts
File metadata and controls
28 lines (24 loc) · 1.05 KB
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
26
27
28
import { describe, expect, it } from 'vitest'
import { clisData, desktopsData, idesData } from '@/lib/generated'
describe('CodeBuddy catalog placement', () => {
it('lists CodeBuddy once as a desktop without a vendor prefix', () => {
const desktop = desktopsData.find(product => product.id === 'codebuddy')
expect(desktop?.name).toBe('CodeBuddy')
expect(desktopsData.some(product => product.id === 'workbuddy')).toBe(false)
expect(idesData.some(product => product.id === 'codebuddy')).toBe(false)
})
it('links the CodeBuddy desktop and CLI as one product family', () => {
const desktop = desktopsData.find(product => product.id === 'codebuddy')
const cli = clisData.find(product => product.id === 'codebuddy-cli')
expect(desktop?.familyId).toBe('codebuddy')
expect(cli?.familyId).toBe('codebuddy')
expect(desktop?.relatedProducts).toContainEqual({
type: 'cli',
productId: 'codebuddy-cli',
})
expect(cli?.relatedProducts).toContainEqual({
type: 'desktop',
productId: 'codebuddy',
})
})
})