Skip to content

Commit

Permalink
Move test-output.ts to test folder
Browse files Browse the repository at this point in the history
  • Loading branch information
danieljharvey committed Apr 5, 2020
1 parent 8713672 commit 2be1390
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
16 changes: 16 additions & 0 deletions test/test-output.ts
Original file line number Diff line number Diff line change
@@ -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;
})
);
});

0 comments on commit 2be1390

Please sign in to comment.