test: add service tests for DirectusClient, DirectusError, categories, files, listings, and notifications

This commit is contained in:
2026-02-08 14:08:57 +01:00
parent 5493148551
commit 763870e135
4 changed files with 674 additions and 1 deletions

View File

@@ -93,17 +93,25 @@
</div>
<script type="module">
import { renderResults } from './test-runner.js'
import { renderResults, runAsyncTests } from './test-runner.js'
const container = document.getElementById('results')
// Run all test files
async function runTests() {
try {
// Sync tests
await import('./helpers.test.js')
await import('./i18n.test.js')
await import('./router.test.js')
// Service tests (sync + async)
await import('./client.test.js')
await import('./services.test.js')
// Run queued async tests
await runAsyncTests()
// Clear loading message and render results
container.querySelector('.loading').remove()
renderResults(container)