Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bodrovis committed Sep 2, 2024
1 parent d98d1d8 commit 9b340be
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"build": "tsc",
"test": "vitest run --coverage",
"test:watch": "vitest watch",
"lint:fix": "npx @biomejs/biome check --write ./"
"lint:fix": "npx @biomejs/biome check --write ./",
"lint:fix:unsafe": "npx @biomejs/biome check --write --unsafe ./"
},
"publishConfig": {
"access": "public"
Expand Down
8 changes: 6 additions & 2 deletions test/keys/keys.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,12 @@ describe("Keys", () => {
pagination: "cursor",
};

const { project_id, ...stubParams } = params;

const stub = new Stub({
fixture: "keys/list_cursor_pagination.json",
uri: `projects/${projectId}/keys`,
query: params,
query: stubParams,
respHeaders: {
"x-pagination-limit": "2",
"x-pagination-next-cursor": "eyIxIjo0NDU5NjA2MX0=",
Expand Down Expand Up @@ -110,10 +112,12 @@ describe("Keys", () => {
cursor: "eyIxIjo0NDU5NjA2MX0=",
};

const { project_id, ...stubParams } = params;

const stub = new Stub({
fixture: "keys/list_next_cursor_pagination.json",
uri: `projects/${projectId}/keys`,
query: params,
query: stubParams,
respHeaders: {
"x-pagination-limit": "2",
"x-pagination-next-cursor": "eyIxIjo0NDU5NjA2M30=",
Expand Down
8 changes: 6 additions & 2 deletions test/translations/translations.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,12 @@ describe("Translations", () => {
pagination: "cursor",
};

const { project_id, ...stubParams } = params;

const stub = new Stub({
fixture: "translations/list_cursor_pagination.json",
uri: `projects/${projectId}/translations`,
query: params,
query: stubParams,
respHeaders: {
"x-pagination-limit": "100",
"x-pagination-next-cursor": "eyIxIjo1MjcyNjU2MTF9",
Expand Down Expand Up @@ -103,10 +105,12 @@ describe("Translations", () => {
limit: 2,
};

const { project_id, ...stubParams } = params;

const stub = new Stub({
fixture: "translations/list_cursor_pagination.json",
uri: `projects/${projectId}/translations`,
query: params,
query: stubParams,
respHeaders: {
"x-pagination-limit": "2",
"x-pagination-next-cursor": "eyIxIjo1MjcyNjU2MTd9",
Expand Down

0 comments on commit 9b340be

Please sign in to comment.