openpencil/tests/engine/profiler/gpu-timer.test.ts
2026-05-24 12:15:29 +03:00

16 lines
398 B
TypeScript

import { describe, it, expect } from 'bun:test'
import { GPUTimer } from '@open-pencil/core'
describe('GPUTimer', () => {
it('handles null GL context', () => {
const timer = new GPUTimer(null)
expect(timer.available).toBe(false)
expect(timer.lastGpuTimeMs).toBeNaN()
timer.beginFrame()
timer.endFrame()
expect(timer.pollResults()).toBeNull()
timer.destroy()
})
})