Compare commits

..

2 commits

Author SHA1 Message Date
ebf270f2bb Plan tests
All checks were successful
Test / build (push) Successful in 9s
2024-09-14 17:59:12 +01:00
af30ab5ea7 Fix cli not allowing both -q and --json flags at the same time 2024-09-14 17:57:42 +01:00
2 changed files with 11 additions and 0 deletions

View file

@ -8,6 +8,15 @@ export default class OutputHelper {
const outputLines: string[] = [];
if (options.json) {
if (options.queryMetadata != null) {
return JSON.stringify({
...result,
query: {
...response.Query,
}
})
}
return JSON.stringify(result);
}

View file

@ -102,4 +102,6 @@ describe("GenerateOutput", () => {
// Assert
expect(result).toMatchSnapshot();
});
test.todo("GIVEN options.queryMetadata AND options.json is supplied, EXPECT query metadata to be in JSON format")
});