perf(y-indexeddb): improve boost and loading time (#1879)

This commit is contained in:
Himself65
2023-04-11 17:29:44 -05:00
committed by GitHub
parent a599364218
commit f3af128baf
8 changed files with 220 additions and 21 deletions

View File

@@ -1,3 +1,6 @@
import { ok } from 'node:assert';
import { resolve } from 'node:path';
import type { PageMeta } from '@blocksuite/store';
import { faker } from '@faker-js/faker';
import type { Page } from '@playwright/test';
@@ -7,6 +10,13 @@ const user1 = require('@affine-test/fixtures/built-in-user1.json');
// eslint-disable-next-line @typescript-eslint/no-var-requires
const user2 = require('@affine-test/fixtures/built-in-user2.json');
export const rootDir = resolve(__dirname, '..', '..');
// assert that the rootDir is the root of the project
// eslint-disable-next-line @typescript-eslint/no-var-requires
ok(require(resolve(rootDir, 'package.json')).name.toLowerCase() === 'affine');
export const testResultDir = resolve(rootDir, 'test-results');
export async function getBuiltInUser() {
return Promise.all([
fetch('http://localhost:3000/api/user/token', {