Skip to content

Commit c0772ce

Browse files
committed
not idepmpotet
1 parent b54a04e commit c0772ce

File tree

1 file changed

+38
-37
lines changed

1 file changed

+38
-37
lines changed

packages/federation/tests/federation-compatibility.test.ts

Lines changed: 38 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -155,45 +155,46 @@ describe('Federation Compatibility', () => {
155155
});
156156
tests.forEach((_, i) => {
157157
describe(`test-query-${i}`, () => {
158-
it('gives the correct result w/ core', async () => {
159-
const test = tests[i];
160-
if (!test) {
161-
throw new Error(`Test ${i} not found`);
162-
}
163-
const document = parse(test.query, { noLocation: true });
164-
const validationErrors = validate(stitchedSchema, document);
165-
let result: ExecutionResult;
166-
if (validationErrors.length > 0) {
167-
result = {
168-
errors: validationErrors,
169-
};
170-
} else {
171-
const execRes = await normalizedExecutor({
172-
schema: stitchedSchema,
173-
document,
174-
});
175-
assertSingleExecutionValue(execRes);
176-
result = execRes;
177-
}
178-
const received = {
179-
data: result.data ?? null,
180-
errors: !!result.errors?.length,
181-
};
158+
// TODO: audit tests are not idempotent anymore, we need to restart the subgraphs
159+
// it('gives the correct result w/ core', async () => {
160+
// const test = tests[i];
161+
// if (!test) {
162+
// throw new Error(`Test ${i} not found`);
163+
// }
164+
// const document = parse(test.query, { noLocation: true });
165+
// const validationErrors = validate(stitchedSchema, document);
166+
// let result: ExecutionResult;
167+
// if (validationErrors.length > 0) {
168+
// result = {
169+
// errors: validationErrors,
170+
// };
171+
// } else {
172+
// const execRes = await normalizedExecutor({
173+
// schema: stitchedSchema,
174+
// document,
175+
// });
176+
// assertSingleExecutionValue(execRes);
177+
// result = execRes;
178+
// }
179+
// const received = {
180+
// data: result.data ?? null,
181+
// errors: !!result.errors?.length,
182+
// };
182183

183-
const expected = {
184-
data: test.expected.data ?? null,
185-
errors: test.expected.errors ?? false,
186-
};
184+
// const expected = {
185+
// data: test.expected.data ?? null,
186+
// errors: test.expected.errors ?? false,
187+
// };
187188

188-
try {
189-
expect(received).toEqual(expected);
190-
} catch (e) {
191-
result.errors?.forEach((err) => {
192-
console.error(err);
193-
});
194-
throw e;
195-
}
196-
});
189+
// try {
190+
// expect(received).toEqual(expected);
191+
// } catch (e) {
192+
// result.errors?.forEach((err) => {
193+
// console.error(err);
194+
// });
195+
// throw e;
196+
// }
197+
// });
197198
it('gives the correct result w/ gateway', async () => {
198199
const test = tests[i];
199200
if (!test) {

0 commit comments

Comments
 (0)