Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions app/src/__tests__/page-conventions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,13 @@ async function pageSources(): Promise<Map<string, string>> {
const fsName = 'node:fs';
const fs = (await import(/* @vite-ignore */ fsName)) as {
readFileSync(path: string, encoding: 'utf8'): string;
readdirSync(path: string): string[];
readdirSync(path: string, options: { recursive: true }): string[];
};
const files = fs.readdirSync(PAGES).filter((file) => file.endsWith('.ts'));
// Recursive, so a page split into a folder (pages/network/) is still checked.
const files = fs
.readdirSync(PAGES, { recursive: true })
.map((file) => file.replaceAll('\\', '/'))
.filter((file) => file.endsWith('.ts'));
return new Map(files.map((file) => [file, fs.readFileSync(`${PAGES}${file}`, 'utf8')]));
}

Expand Down Expand Up @@ -125,7 +129,8 @@ describe('pages with a keyboard list use the shared roving list', () => {
const lists = {
'capacitor-inspector.ts': '[data-cap-call]',
'pipes-inspector.ts': '[data-pipe-row]',
'network-inspector.ts': '',
'network/call-timeline.ts': '',
'network/ssr-requests.ts': '',
'query-inspector.ts': '',
'signal-inspector.ts': '',
'store-inspector.ts': '',
Expand Down
Loading
Loading