Skip to content

Commit

Permalink
Add more tests for the TypeScript definition (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
BendingBender authored and sindresorhus committed Apr 7, 2019
1 parent f89815a commit eb73a47
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions index.test-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,15 @@ const callsite = callsites()[0];

expectType<CallSite[]>(callsites());
expectType<unknown | undefined>(callsite.getThis());
expectType<string | null>(callsite.getTypeName());
expectType<Function | undefined>(callsite.getFunction());
expectType<string | null>(callsite.getFunctionName());
expectType<string | undefined>(callsite.getMethodName());
expectType<string | null>(callsite.getFileName());
expectType<number | null>(callsite.getLineNumber());
expectType<number | null>(callsite.getColumnNumber());
expectType<string | undefined>(callsite.getEvalOrigin());
expectType<boolean>(callsite.isToplevel());
expectType<boolean>(callsite.isEval());
expectType<boolean>(callsite.isNative());
expectType<boolean>(callsite.isConstructor());

0 comments on commit eb73a47

Please sign in to comment.