This commit is contained in:
@@ -31,14 +31,15 @@ describe('HL.langFor / langLabel', () => {
|
||||
|
||||
describe('HL.iconFor', () => {
|
||||
it('uses name-specific icons', () => {
|
||||
expect(HL.iconFor('composer.json').t).toBe('co')
|
||||
expect(HL.iconFor('package.json').t).toBe('pk')
|
||||
expect(HL.iconFor('composer.json').c).toBe('#C3A6CE')
|
||||
expect(HL.iconFor('package.json').c).toBe('#F0B476')
|
||||
})
|
||||
it('falls back to extension icons', () => {
|
||||
expect(HL.iconFor('x.php').c).toBe('#a78bdb')
|
||||
expect(HL.iconFor('x.php').c).toBe('#C3A6CE')
|
||||
})
|
||||
it('falls back to first two letters for unknown types', () => {
|
||||
expect(HL.iconFor('weird.zzz').t).toBe('we')
|
||||
it('falls back to the extension for unknown types', () => {
|
||||
expect(HL.iconFor('weird.zzz').t).toBe('zzz')
|
||||
expect(HL.iconFor('weird.zzz').c).toBe('#BAC0C0')
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
@@ -170,7 +170,7 @@ describe('project note', () => {
|
||||
const c = await boot()
|
||||
await openNote(c)
|
||||
const hint = c.querySelector('.notes-modal .notes-hint')
|
||||
expect(hint?.textContent).toContain('To agent')
|
||||
expect(hint?.textContent).toContain('To the agent')
|
||||
expect(hint?.querySelector('kbd')?.textContent).toBe('⌘P')
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user