@whisk/client 0.0.9 → 0.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/src/WhiskClient.test.ts +27 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@whisk/client",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.11",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/office-supply-ventures/whisk-sdk.git",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"@atmina/urql-custom-scalars-exchange": "1.2.0",
|
|
28
28
|
"@urql/core": "6.0.1",
|
|
29
29
|
"gql.tada": "1.9.0",
|
|
30
|
-
"@whisk/graphql": "0.0.
|
|
30
|
+
"@whisk/graphql": "0.0.11"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"graphql": ">=16"
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { describe, expect, it } from "vitest"
|
|
2
|
+
import { WhiskClient } from "./WhiskClient.js"
|
|
3
|
+
|
|
4
|
+
describe("WhiskClient", () => {
|
|
5
|
+
it("creates client with config", () => {
|
|
6
|
+
const client = new WhiskClient({
|
|
7
|
+
apiKey: "test-key",
|
|
8
|
+
})
|
|
9
|
+
expect(client).toBeDefined()
|
|
10
|
+
})
|
|
11
|
+
|
|
12
|
+
it("creates client with custom url", () => {
|
|
13
|
+
const client = new WhiskClient({
|
|
14
|
+
apiKey: "test-key",
|
|
15
|
+
url: "https://custom.api.example.com/graphql",
|
|
16
|
+
})
|
|
17
|
+
expect(client).toBeDefined()
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
it("creates client with debug mode", () => {
|
|
21
|
+
const client = new WhiskClient({
|
|
22
|
+
apiKey: "test-key",
|
|
23
|
+
debug: true,
|
|
24
|
+
})
|
|
25
|
+
expect(client).toBeDefined()
|
|
26
|
+
})
|
|
27
|
+
})
|