-
Notifications
You must be signed in to change notification settings - Fork 311
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests(ts-client): refactor to one default schema (#790)
- Loading branch information
1 parent
5f13401
commit a554328
Showing
27 changed files
with
1,094 additions
and
1,608 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,14 @@ | ||
/* eslint-disable */ | ||
import { expect, test } from 'vitest' | ||
import { $Index as schemaIndex } from '../../tests/_/schema/generated/SchemaRuntime.js' | ||
import { setupMockServer } from '../../tests/raw/__helpers.js' | ||
import { $Index as schemaIndex } from '../../tests/ts/_/schema/generated/SchemaRuntime.js' | ||
import { create } from './client.js' | ||
|
||
const ctx = setupMockServer() | ||
const data = { fooBarUnion: { int: 1 } } | ||
const data = { unionFooBar: { int: 1 } } | ||
|
||
const client = () => create({ name: 'MigrateMe', schema: ctx.url, schemaIndex }) | ||
const client = () => create({ schema: ctx.url, schemaIndex }) | ||
|
||
test.todo(`query`, async () => { | ||
const mockRes = ctx.res({ body: { data } }).spec.body! | ||
expect(await client().query.$batch({ fooBarUnion: { onBar: { int: true } } })).toEqual(mockRes.data) | ||
expect(await client().query.$batch({ unionFooBar: { onBar: { int: true } } })).toEqual(mockRes.data) | ||
}) |
Oops, something went wrong.