From e3cf9b0661b708c63acd8a1bb4760ddade8def8e Mon Sep 17 00:00:00 2001 From: Rory Powell Date: Wed, 6 Apr 2022 22:00:10 +0100 Subject: [PATCH] rename data -> structures --- packages/backend-core/src/tests/utilities/index.js | 4 ++-- .../src/tests/utilities/{data => structures}/index.js | 4 ++-- .../src/tests/utilities/{data => structures}/koa.js | 0 packages/backend-core/src/tests/utils.spec.js | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) rename packages/backend-core/src/tests/utilities/{data => structures}/index.js (55%) rename packages/backend-core/src/tests/utilities/{data => structures}/koa.js (100%) diff --git a/packages/backend-core/src/tests/utilities/index.js b/packages/backend-core/src/tests/utilities/index.js index 2b7f91cf0d..db3d027511 100644 --- a/packages/backend-core/src/tests/utilities/index.js +++ b/packages/backend-core/src/tests/utilities/index.js @@ -1,7 +1,7 @@ const mocks = require("./mocks") -const data = require("./data") +const structures = require("./structures") module.exports = { mocks, - data, + structures, } diff --git a/packages/backend-core/src/tests/utilities/data/index.js b/packages/backend-core/src/tests/utilities/structures/index.js similarity index 55% rename from packages/backend-core/src/tests/utilities/data/index.js rename to packages/backend-core/src/tests/utilities/structures/index.js index 78f54e9104..6ac3b1f5f4 100644 --- a/packages/backend-core/src/tests/utilities/data/index.js +++ b/packages/backend-core/src/tests/utilities/structures/index.js @@ -1,8 +1,8 @@ require("../mocks") const koa = require("./koa") -const data = { +const structures = { koa, } -module.exports = data +module.exports = structures diff --git a/packages/backend-core/src/tests/utilities/data/koa.js b/packages/backend-core/src/tests/utilities/structures/koa.js similarity index 100% rename from packages/backend-core/src/tests/utilities/data/koa.js rename to packages/backend-core/src/tests/utilities/structures/koa.js diff --git a/packages/backend-core/src/tests/utils.spec.js b/packages/backend-core/src/tests/utils.spec.js index 618c71ad6a..a1415a21b9 100644 --- a/packages/backend-core/src/tests/utils.spec.js +++ b/packages/backend-core/src/tests/utils.spec.js @@ -1,11 +1,11 @@ -const { data } = require("./utilities") +const { structures } = require("./utilities") const utils = require("../utils") const events = require("../events") describe("utils", () => { describe("platformLogout", () => { it("should call platform logout", async () => { - const ctx = data.koa.newContext() + const ctx = structures.koa.newContext() await utils.platformLogout({ ctx, userId: "test" }) expect(events.auth.logout.mock.calls.length).toBe(1) })