fix tests run
Build & Deploy / Build & Push Docker Image (push) Failing after 6s
Build & Deploy / Deploy to VPS (push) Has been skipped
Test / Type Check (all packages) (push) Failing after 32s
Test / API Unit Tests (push) Has been skipped
Test / Homepage Unit Tests (push) Has been skipped
Test / Storefront Unit Tests (push) Has been skipped
Test / Admin Unit Tests (push) Has been skipped
Test / Dashboard Unit Tests (push) Has been skipped
Test / API Integration Tests (push) Has been skipped

This commit is contained in:
root
2026-06-27 23:40:40 -04:00
parent 9dd4a3d087
commit a486f891cf
4 changed files with 4 additions and 4 deletions
+1
View File
@@ -0,0 +1 @@
import '@testing-library/jest-dom/vitest';
+1 -2
View File
@@ -30,8 +30,7 @@
"forceConsistentCasingInFileNames": true, "forceConsistentCasingInFileNames": true,
"verbatimModuleSyntax": true, "verbatimModuleSyntax": true,
"types": [ "types": [
"vitest/globals", "vitest/globals"
"@testing-library/jest-dom/vitest"
], ],
"paths": { "paths": {
"@/*": [ "@/*": [
@@ -10,7 +10,7 @@ import AppTermsArPage from './app-tc-ar/page'
function expectPolicyPage(element: unknown, slug: string, forcedLanguage: string) { function expectPolicyPage(element: unknown, slug: string, forcedLanguage: string) {
expect(isValidElement(element)).toBe(true) expect(isValidElement(element)).toBe(true)
const page = element as React.ReactElement const page = element as React.ReactElement<Record<string, unknown>>
expect(page.type).toBe(FooterContentPage) expect(page.type).toBe(FooterContentPage)
expect(page.props.slug).toBe(slug) expect(page.props.slug).toBe(slug)
expect(page.props.forcedLanguage).toBe(forcedLanguage) expect(page.props.forcedLanguage).toBe(forcedLanguage)
@@ -17,7 +17,7 @@ function collectText(node: unknown): string[] {
return [] return []
} }
function collectElements(node: unknown): React.ReactElement[] { function collectElements(node: unknown): React.ReactElement<Record<string, unknown>>[] {
if (node === null || node === undefined || typeof node === 'boolean') return [] if (node === null || node === undefined || typeof node === 'boolean') return []
if (Array.isArray(node)) return node.flatMap(collectElements) if (Array.isArray(node)) return node.flatMap(collectElements)
if (!isValidElement<{ children?: React.ReactNode }>(node)) return [] if (!isValidElement<{ children?: React.ReactNode }>(node)) return []