Address PR feedback: refactor browser tests for better type safety

This commit is contained in:
DrJKL
2026-01-12 18:02:59 -08:00
parent 3a0c84145c
commit 4c46f5786b
14 changed files with 131 additions and 177 deletions

View File

@@ -182,7 +182,9 @@ test.describe('Workflows sidebar', () => {
// Compare the exported workflow with the original
expect(downloadedContent).toBeDefined()
expect(downloadedContentZh).toBeDefined()
if (!downloadedContent || !downloadedContentZh) return
if (!downloadedContent || !downloadedContentZh) {
throw new Error('Downloaded workflow content is undefined')
}
delete downloadedContent.id
delete downloadedContentZh.id
expect(downloadedContent).toEqual(downloadedContentZh)