upd: tampilan
This commit is contained in:
30
tests/integration/dashboard.test.ts
Normal file
30
tests/integration/dashboard.test.ts
Normal file
@@ -0,0 +1,30 @@
|
||||
import { test, expect, describe } from 'bun:test'
|
||||
import { createTestApp } from '../helpers'
|
||||
|
||||
const app = createTestApp()
|
||||
|
||||
describe('Dashboard Routes (SPA)', () => {
|
||||
test('GET /dashboard returns 200 HTML', async () => {
|
||||
const res = await app.handle(new Request('http://localhost/dashboard'))
|
||||
expect(res.status).toBe(200)
|
||||
expect(res.headers.get('content-type')).toContain('text/html')
|
||||
})
|
||||
|
||||
test('GET /apps returns 200 HTML', async () => {
|
||||
const res = await app.handle(new Request('http://localhost/apps'))
|
||||
expect(res.status).toBe(200)
|
||||
expect(res.headers.get('content-type')).toContain('text/html')
|
||||
})
|
||||
|
||||
test('GET /apps/desa-plus returns 200 HTML', async () => {
|
||||
const res = await app.handle(new Request('http://localhost/apps/desa-plus'))
|
||||
expect(res.status).toBe(200)
|
||||
expect(res.headers.get('content-type')).toContain('text/html')
|
||||
})
|
||||
|
||||
test('GET /settings returns 200 HTML', async () => {
|
||||
const res = await app.handle(new Request('http://localhost/settings'))
|
||||
expect(res.status).toBe(200)
|
||||
expect(res.headers.get('content-type')).toContain('text/html')
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user