diff --git a/packages/next-drupal/tests/utils/mocks/index.ts b/packages/next-drupal/tests/utils/mocks/index.ts index 96ddd33a..970d69af 100644 --- a/packages/next-drupal/tests/utils/mocks/index.ts +++ b/packages/next-drupal/tests/utils/mocks/index.ts @@ -1,3 +1,3 @@ export * from "./data" -export * from "./fetch" -export * from "./logger" +export * from "./spyOnFetch" +export * from "./mockLogger" diff --git a/packages/next-drupal/tests/utils/mocks/logger.ts b/packages/next-drupal/tests/utils/mocks/mockLogger.ts similarity index 100% rename from packages/next-drupal/tests/utils/mocks/logger.ts rename to packages/next-drupal/tests/utils/mocks/mockLogger.ts diff --git a/packages/next-drupal/tests/utils/mocks/fetch.ts b/packages/next-drupal/tests/utils/mocks/spyOnFetch.ts similarity index 100% rename from packages/next-drupal/tests/utils/mocks/fetch.ts rename to packages/next-drupal/tests/utils/mocks/spyOnFetch.ts diff --git a/packages/next-drupal/tests/utils/rpc.ts b/packages/next-drupal/tests/utils/rpc.ts index 7b3e4b7d..86533e8c 100644 --- a/packages/next-drupal/tests/utils/rpc.ts +++ b/packages/next-drupal/tests/utils/rpc.ts @@ -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,