mirror of
https://github.com/aljazceru/turso.git
synced 2025-12-19 01:24:20 +01:00
15 lines
477 B
TypeScript
15 lines
477 B
TypeScript
import { expect, test } from 'vitest'
|
|
import { maybePromise } from './promise.js'
|
|
|
|
test('drizzle-orm', async () => {
|
|
const lazy = maybePromise(() => fetch('http://google.com'));
|
|
let status, headers;
|
|
//@ts-ignore
|
|
lazy.apply(x => { status = x.status; })
|
|
//@ts-ignore
|
|
lazy.apply(x => { headers = x.headers; })
|
|
let response = await lazy.resolve();
|
|
expect(response).not.toBeNull();
|
|
expect(status).toBe(200);
|
|
expect(headers).not.toBeNull();
|
|
}) |