diff --git a/test.sh b/test.sh index 9247d0e..9b5b057 100755 --- a/test.sh +++ b/test.sh @@ -31,4 +31,4 @@ yarn graphql-codegen --config ./test/github/codegen.yml yarn tsc --noEmit ./output/github/output.ts # output some shit (only from the basic one, the advanced one blows the stack) -yarn ts-node ./output/test-output.ts +yarn ts-node ./test/test-output.ts diff --git a/test/test-output.ts b/test/test-output.ts new file mode 100644 index 0000000..c7cf7aa --- /dev/null +++ b/test/test-output.ts @@ -0,0 +1,16 @@ +import * as generated from "./twitter/output"; +import * as fc from "fast-check"; + +const items: any = { ...generated }; + +Object.keys(items).forEach((key: string) => { + const func = items[key]; + console.log(`---------------${key}-----------------`); + const arb = (func as any)(); + fc.assert( + fc.property(arb, a => { + console.log(a); + return true; + }) + ); +});