Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

usage.test.ts

17 lines408 Bytes

1import { describe, expect, it } from "@effect/vitest";
2​
3import { totalTokens } from "./usage.ts";
4​
5describe("totalTokens", () => {
6 it("does not add reasoning on top of output", () => {
7 expect(
8 totalTokens({
9 uncachedInputTokens: 10,
10 cachedInputTokens: 20,
11 cacheCreationTokens: 30,
12 outputTokens: 40,
13 reasoningTokens: 25,
14 }),
15 ).toBe(100);
16 });
17});