Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: stop printing prototype in Jest snapshots #354

Merged
merged 1 commit into from
May 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions jest.project.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ module.exports = ({ dirname, projectMode = true }) => {
resolver: './node_modules/bob-the-bundler/jest-resolver.cjs',
snapshotFormat: {
escapeString: false,
printBasicPrototype: false,
},
};
};
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Flow Resolvers Plugin Should generate basic type resolvers 1`] = `
Object {
{
"content": "export type Resolver<Result, Parent = {}, Context = {}, Args = {}> = (
parent: Parent,
args: Args,
Expand Down Expand Up @@ -177,7 +177,7 @@ export type DirectiveResolvers<ContextType = any> = {
authenticated?: AuthenticatedDirectiveResolver<any, any, ContextType>,
};
",
"prepend": Array [
"prepend": [
"import { type GraphQLResolveInfo, type GraphQLScalarType, type GraphQLScalarTypeConfig } from 'graphql';",
"export type $RequireFields<Origin, Keys> = $Diff<Origin, Keys> & $ObjMapi<Keys, <Key>(k: Key) => $NonMaybeType<$ElementType<Origin, Key>>>;",
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export const mockUpdateUserMutation = (resolver: ResponseResolver<GraphQLRequest
`;

exports[`msw Should generate mocks based on queries and mutations: imports 1`] = `
Array [
[
"import { graphql, ResponseResolver, GraphQLRequest, GraphQLContext } from 'msw'",
]
`;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`TypeScript Nhost Plugin should generate the nhost-compatible schema 1`] = `
Object {
{
"content": "/** All built-in and custom scalars, mapped to their actual values */
export type Scalars = {
ID: string;
Expand Down Expand Up @@ -723,7 +723,7 @@ export default {
Query_SearchArgs: Query_SearchArgs
}
}",
"prepend": Array [
"prepend": [
"export type Maybe<T> = T | null;",
"export type InputMaybe<T> = Maybe<T>;",
"export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };",
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7833,7 +7833,7 @@ yargs-parser@^18.1.2, yargs-parser@^18.1.3:
camelcase "^5.0.0"
decamelize "^1.2.0"

yargs-parser@^21.0.0, yargs-parser@^21.0.1, yargs-parser@^21.1.1:
yargs-parser@^21.0.1, yargs-parser@^21.1.1:
version "21.1.1"
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35"
integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==
Expand Down