Skip to content

Commit

Permalink
test: fix for vitest upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
Brooooooklyn committed Dec 8, 2023
1 parent 04e288a commit 0113b43
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
9 changes: 5 additions & 4 deletions packages/frontend/electron/test/db/migration.spec.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import path from 'node:path';

import {
copyToTemp,
migrateToSubdocAndReplaceDatabase,
} from '@affine/electron/helper/db/migration';
import { SqliteConnection } from '@affine/native';
import { removeWithRetry } from '@affine-test/kit/utils/utils';
import { afterEach, describe, expect, it, vi } from 'vitest';
import { applyUpdate, Doc as YDoc } from 'yjs';

import {
copyToTemp,
migrateToSubdocAndReplaceDatabase,
} from '../../src/helper/db/migration';

const tmpDir = path.join(__dirname, 'tmp');
const testDBFilePath = path.resolve(__dirname, 'old-db.affine');

Expand Down
4 changes: 2 additions & 2 deletions packages/frontend/graphql/src/__tests__/fetcher.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ describe('GraphQL fetcher', () => {
});

expect(fetch.mock.lastCall[1].body).toMatchInlineSnapshot(
'"{\\"query\\":\\"query { field }\\",\\"variables\\":{\\"a\\":false,\\"b\\":null},\\"operationName\\":\\"query\\"}"'
`"{"query":"query { field }","variables":{"a":false,"b":null},"operationName":"query"}"`
);

await gql({
Expand All @@ -91,7 +91,7 @@ describe('GraphQL fetcher', () => {
});

expect(fetch.mock.lastCall[1].body).toMatchInlineSnapshot(
'"{\\"query\\":\\"query { field }\\",\\"variables\\":{\\"a\\":false},\\"operationName\\":\\"query\\"}"'
`"{"query":"query { field }","variables":{"a":false},"operationName":"query"}"`
);
});

Expand Down

0 comments on commit 0113b43

Please sign in to comment.