Skip to content

Commit a0436f5

Browse files
committed
Remove obsolete tests
1 parent 5609723 commit a0436f5

1 file changed

Lines changed: 0 additions & 100 deletions

File tree

packages/plugins/typescript/operations/tests/ts-documents.spec.ts

Lines changed: 0 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -45,51 +45,6 @@ describe('TypeScript Operations Plugin', () => {
4545
await validate(content);
4646
});
4747

48-
it('Should handle "namespacedImportName" and add it when specified', async () => {
49-
const ast = parse(/* GraphQL */ `
50-
query notifications {
51-
notifications {
52-
id
53-
54-
... on TextNotification {
55-
text
56-
textAlias: text
57-
}
58-
59-
... on TextNotification {
60-
text
61-
}
62-
63-
... on ImageNotification {
64-
imageUrl
65-
metadata {
66-
created: createdBy
67-
}
68-
}
69-
}
70-
}
71-
`);
72-
73-
const { content } = await plugin(
74-
schema,
75-
[{ location: 'test-file.ts', document: ast }],
76-
{ namespacedImportName: 'Types' },
77-
{ outputFile: '' }
78-
);
79-
80-
expect(content).toMatchInlineSnapshot(`
81-
"export type NotificationsQueryVariables = Exact<{ [key: string]: never; }>;
82-
83-
84-
export type NotificationsQuery = { notifications: Array<
85-
| { text: string, id: string, textAlias: string }
86-
| { imageUrl: string, id: string, metadata: { created: string } }
87-
> };
88-
"
89-
`);
90-
await validate(content, '', [`Cannot find namespace 'Types'.`]);
91-
});
92-
9348
it('Can merge an inline fragment with a spread', async () => {
9449
const testSchema = buildSchema(/* GraphQL */ `
9550
interface Comment {
@@ -153,61 +108,6 @@ describe('TypeScript Operations Plugin', () => {
153108
`);
154109
});
155110

156-
it('Should handle "namespacedImportName"', async () => {
157-
const testSchema = buildSchema(/* GraphQL */ `
158-
type Query {
159-
f: E
160-
user: User!
161-
}
162-
163-
enum E {
164-
A
165-
B
166-
}
167-
168-
scalar JSON
169-
170-
type User {
171-
id: ID!
172-
f: E
173-
j: JSON
174-
}
175-
`);
176-
const ast = parse(/* GraphQL */ `
177-
query test {
178-
f
179-
user {
180-
id
181-
f
182-
j
183-
}
184-
}
185-
`);
186-
187-
const { content } = await plugin(
188-
testSchema,
189-
[{ location: 'test-file.ts', document: ast }],
190-
{ namespacedImportName: 'Types' },
191-
{ outputFile: '' }
192-
);
193-
194-
expect(content).toMatchInlineSnapshot(
195-
`
196-
"export type E =
197-
| 'A'
198-
| 'B';
199-
200-
export type TestQueryVariables = Exact<{ [key: string]: never; }>;
201-
202-
203-
export type TestQuery = { f: Types.E | null, user: { id: string, f: Types.E | null, j: any | null } };
204-
"
205-
`
206-
);
207-
208-
await validate(content, '', [`Cannot find namespace 'Types'.`]);
209-
});
210-
211111
it('Should generate the correct output when using immutableTypes config', async () => {
212112
const ast = parse(/* GraphQL */ `
213113
query notifications {

0 commit comments

Comments
 (0)