MCPcopy Index your code
hub / github.com/anomalyco/opencode / makeInput

Function makeInput

packages/opencode/test/plugin/snowflake-cortex.test.ts:5–32  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3import { oauthScope, SnowflakeCortexAuthPlugin } from "../../src/plugin/snowflake-cortex"
4
5function makeInput() {
6 let auth: any = {
7 type: "oauth",
8 access: "access-old",
9 refresh: "refresh-old",
10 expires: Date.now() + 3600_000,
11 accountId: "myorg-myaccount",
12 }
13 const setCalls: Array<Record<string, unknown>> = []
14
15 return {
16 getAuth: async () => auth,
17 setAuth: (next: any) => {
18 auth = next
19 },
20 input: {
21 client: {
22 auth: {
23 set: async (request: any) => {
24 setCalls.push(request)
25 auth = request.body
26 },
27 },
28 },
29 } as any,
30 setCalls,
31 }
32}
33
34describe("plugin.snowflake-cortex", () => {
35 test("oauthScope uses Snowflake-compatible scope values", () => {

Callers 1

Calls 1

pushMethod · 0.80

Tested by

no test coverage detected