Skip to content

Commit

Permalink
Added extra test to 77
Browse files Browse the repository at this point in the history
  • Loading branch information
mattpocock committed Aug 21, 2023
1 parent 77a3e96 commit 55dffa4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/09-external-libraries/77-react-query-wrapper.problem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,8 @@ type tests = [
// If you pass in an array of numbers in the queryKey, the type of ctx.queryKey
// should be number[]
useApi([1, 2], async (ctx, token) => {
type test = Expect<Equal<typeof ctx.queryKey, number[]>>;
type tests = [
Expect<Equal<typeof ctx.queryKey, number[]>>,
Expect<Equal<typeof token, string>>,
];
});
5 changes: 4 additions & 1 deletion src/09-external-libraries/77-react-query-wrapper.solution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,8 @@ type tests = [
// If you pass in an array of numbers in the queryKey, the type of ctx.queryKey
// should be number[]
useApi([1, 2], async (ctx, token) => {
type test = Expect<Equal<typeof ctx.queryKey, number[]>>;
type tests = [
Expect<Equal<typeof ctx.queryKey, number[]>>,
Expect<Equal<typeof token, string>>,
];
});

0 comments on commit 55dffa4

Please sign in to comment.