You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it('variable not used by unreferenced fragment', () => {
expectFailsRule(
NoUnusedVariables, query Foo($b: String) { ...FragA } fragment FragA on Type { field(a: $a) } fragment FragB on Type { field(b: $b) },
[unusedVar('b', 'Foo', 2, 17)],
);
});
it('variable not used by fragment used by other operation', () => {
expectFailsRule(
NoUnusedVariables, query Foo($b: String) { ...FragA } query Bar($a: String) { ...FragB } fragment FragA on Type { field(a: $a) } fragment FragB on Type { field(b: $b) },
[unusedVar('b', 'Foo', 2, 17), unusedVar('a', 'Bar', 5, 17)],
);
});
The text was updated successfully, but these errors were encountered:
Add more tests
it('variable not used by unreferenced fragment', () => {
expectFailsRule(
NoUnusedVariables,
query Foo($b: String) { ...FragA } fragment FragA on Type { field(a: $a) } fragment FragB on Type { field(b: $b) }
,[unusedVar('b', 'Foo', 2, 17)],
);
});
it('variable not used by fragment used by other operation', () => {
expectFailsRule(
NoUnusedVariables,
query Foo($b: String) { ...FragA } query Bar($a: String) { ...FragB } fragment FragA on Type { field(a: $a) } fragment FragB on Type { field(b: $b) }
,[unusedVar('b', 'Foo', 2, 17), unusedVar('a', 'Bar', 5, 17)],
);
});
The text was updated successfully, but these errors were encountered: