Skip to content

Commit

Permalink
Add test for using tanstack core skip token
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Sachs <[email protected]>
  • Loading branch information
paul-sachs committed Oct 21, 2024
1 parent 4fee751 commit 8a20cc3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/connect-query-core/src/create-query-options.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import { skipToken as tanstackSkipToken } from "@tanstack/query-core";
import { describe, expect, it } from "vitest";

import { createConnectQueryKey } from "./connect-query-key.js";
Expand All @@ -32,6 +33,14 @@ describe("createQueryOptions", () => {
});
expect(opt.queryFn).toBe(skipToken);
});

it("honors skipToken directly from tanstack", () => {
const opt = createQueryOptions(sayMethodDescriptor, tanstackSkipToken, {
transport: mockedElizaTransport,
});
expect(opt.queryFn).toBe(tanstackSkipToken);
});

it("sets queryKey", () => {
const want = createConnectQueryKey({
schema: sayMethodDescriptor,
Expand Down

0 comments on commit 8a20cc3

Please sign in to comment.