mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
Merge remote-tracking branch 'origin/main' into ditto-metrics
This commit is contained in:
commit
dbfd759fba
3 changed files with 8 additions and 3 deletions
|
|
@ -10,7 +10,7 @@ test:
|
|||
stage: test
|
||||
script:
|
||||
- deno fmt --check
|
||||
- deno lint
|
||||
- deno lint --allow-import
|
||||
- deno task check
|
||||
- deno task test --coverage=cov_profile
|
||||
- deno coverage cov_profile
|
||||
|
|
|
|||
|
|
@ -2,9 +2,12 @@ import { assertEquals } from '@std/assert';
|
|||
|
||||
import { DittoPglite } from './DittoPglite.ts';
|
||||
|
||||
Deno.test('DittoPglite.create', () => {
|
||||
Deno.test('DittoPglite.create', async () => {
|
||||
const db = DittoPglite.create('memory://');
|
||||
|
||||
assertEquals(db.poolSize, 1);
|
||||
assertEquals(db.availableConnections, 1);
|
||||
|
||||
await db.kysely.destroy();
|
||||
await new Promise((resolve) => setTimeout(resolve, 100));
|
||||
});
|
||||
|
|
|
|||
|
|
@ -7,8 +7,10 @@ Deno.test('isWorker from the main thread returns false', () => {
|
|||
});
|
||||
|
||||
Deno.test('isWorker from a worker thread returns true', async () => {
|
||||
const url = new URL('./worker.ts', import.meta.url);
|
||||
|
||||
const script = `
|
||||
import { isWorker } from '@/utils/worker.ts';
|
||||
import { isWorker } from '${url.href}';
|
||||
postMessage(isWorker());
|
||||
self.close();
|
||||
`;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue