Add Prettier and ESLint tooling (Refs #77)

This commit is contained in:
2026-10-09 15:56:13 -04:00
parent 8ed059b8d3
commit 16469e2d43
711 changed files with 99737 additions and 28286 deletions
+8 -4
View File
@@ -11,14 +11,18 @@ it('connects the search field to a labelled option list and its selected result'
expect(body).toContain('aria-expanded="true"');
const list = /aria-controls="([^"]+)"/.exec(body)?.[1];
const active = /aria-activedescendant="([^"]+)"/.exec(body)?.[1];
expect(list).toBeTruthy(); expect(active).toBeTruthy();
expect(list).toBeTruthy();
expect(active).toBeTruthy();
expect(body).toContain(`id="${list}" role="listbox"`);
expect(body).toContain(`id="${active}" role="option" tabindex="-1" aria-selected="true"`);
expect(body).toContain('Create server'); expect(body).not.toContain('Add host');
expect(body).toContain('Create server');
expect(body).not.toContain('Add host');
});
it('keeps the navigation palette useful for viewers without offering write actions', () => {
const body = render(CommandPalette, { props: { open: true, role: 'viewer' } }).body;
expect(body).toContain('Campaigns'); expect(body).toContain('Leaderboard');
expect(body).not.toContain('Create server'); expect(body).not.toContain('Add host');
expect(body).toContain('Campaigns');
expect(body).toContain('Leaderboard');
expect(body).not.toContain('Create server');
expect(body).not.toContain('Add host');
});