Skip to content

Commit

Permalink
test(next-drupal): fix bug in jsonRpc test util and rename utils files
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnAlbin committed Apr 24, 2024
1 parent 5ed427e commit 6c98513
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions packages/next-drupal/tests/utils/mocks/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export * from "./data"
export * from "./fetch"
export * from "./logger"
export * from "./spyOnFetch"
export * from "./mockLogger"
6 changes: 3 additions & 3 deletions packages/next-drupal/tests/utils/rpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ class JsonRpc extends NextDrupalBase {
this.apiPrefix = "/jsonrpc"
}

async execute(body) {
const endpoint = await jsonRpc.buildEndpoint()
async execute(body: object) {
const endpoint = await this.buildEndpoint()

const response = await jsonRpc.fetch(endpoint, {
const response = await this.fetch(endpoint, {
method: "POST",
body: JSON.stringify(body),
withAuth: true,
Expand Down

0 comments on commit 6c98513

Please sign in to comment.