From 456405074bd411d1fc12a59ef1d54fec13a03f28 Mon Sep 17 00:00:00 2001 From: TheBass Date: Tue, 14 Nov 2023 23:41:54 +1100 Subject: [PATCH] Hierarchy within e2e tests --- Tests/e2e/{ => Commands}/fastServe.test.js | 4 ++-- Tests/e2e/{ => Commands}/gitInit.test.js | 4 ++-- Tests/e2e/{ => Commands}/npmVersion.test.js | 4 ++-- Tests/e2e/{ => Commands}/prettier.test.js | 7 ++++--- Tests/e2e/{ => Commands}/sortPackage.test.js | 4 ++-- 5 files changed, 12 insertions(+), 11 deletions(-) rename Tests/e2e/{ => Commands}/fastServe.test.js (65%) rename Tests/e2e/{ => Commands}/gitInit.test.js (64%) rename Tests/e2e/{ => Commands}/npmVersion.test.js (72%) rename Tests/e2e/{ => Commands}/prettier.test.js (79%) rename Tests/e2e/{ => Commands}/sortPackage.test.js (86%) diff --git a/Tests/e2e/fastServe.test.js b/Tests/e2e/Commands/fastServe.test.js similarity index 65% rename from Tests/e2e/fastServe.test.js rename to Tests/e2e/Commands/fastServe.test.js index a4c26ac..d7331d7 100644 --- a/Tests/e2e/fastServe.test.js +++ b/Tests/e2e/Commands/fastServe.test.js @@ -1,6 +1,6 @@ const fs = require("fs"); -const wpFolderPath = require("../../Utils/folderPaths").wpFolderPath(); -const fastServeCommand = require("../../Commands/fastServe"); +const wpFolderPath = require("../../../Utils/folderPaths").wpFolderPath(); +const fastServeCommand = require("../../../Commands/fastServe"); const resolve = require("path").resolve; beforeAll(() => { diff --git a/Tests/e2e/gitInit.test.js b/Tests/e2e/Commands/gitInit.test.js similarity index 64% rename from Tests/e2e/gitInit.test.js rename to Tests/e2e/Commands/gitInit.test.js index 1e72a66..d7a39e3 100644 --- a/Tests/e2e/gitInit.test.js +++ b/Tests/e2e/Commands/gitInit.test.js @@ -1,7 +1,7 @@ const fs = require("fs"); const resolve = require("path").resolve; -const wpFolderPath = require("../../Utils/folderPaths").wpFolderPath(); -const gitInitCommand = require("../../Commands/gitInit"); +const wpFolderPath = require("../../../Utils/folderPaths").wpFolderPath(); +const gitInitCommand = require("../../../Commands/gitInit"); beforeAll(() => { gitInitCommand.gitInit(wpFolderPath); diff --git a/Tests/e2e/npmVersion.test.js b/Tests/e2e/Commands/npmVersion.test.js similarity index 72% rename from Tests/e2e/npmVersion.test.js rename to Tests/e2e/Commands/npmVersion.test.js index 3dcf0c2..1314a29 100644 --- a/Tests/e2e/npmVersion.test.js +++ b/Tests/e2e/Commands/npmVersion.test.js @@ -1,7 +1,7 @@ const fs = require("fs"); const join = require("path").join; -const wpFolderPath = require("../../Utils/folderPaths").wpFolderPath(); -const npmVersionCommand = require("../../Commands/npmVersion"); +const wpFolderPath = require("../../../Utils/folderPaths").wpFolderPath(); +const npmVersionCommand = require("../../../Commands/npmVersion"); const gulpfilePath = join(wpFolderPath, "gulpfile.js"); diff --git a/Tests/e2e/prettier.test.js b/Tests/e2e/Commands/prettier.test.js similarity index 79% rename from Tests/e2e/prettier.test.js rename to Tests/e2e/Commands/prettier.test.js index a44a6be..870e2f5 100644 --- a/Tests/e2e/prettier.test.js +++ b/Tests/e2e/Commands/prettier.test.js @@ -1,8 +1,9 @@ const fs = require("fs"); const join = require("path").join; -const wpFolderPath = require("../../Utils/folderPaths").wpFolderPath(); -const parentFolderPath = require("../../Utils/folderPaths").parentFolderPath(); -const runPrettierCommand = require("../../Commands/runPrettier"); +const wpFolderPath = require("../../../Utils/folderPaths").wpFolderPath(); +const parentFolderPath = + require("../../../Utils/folderPaths").parentFolderPath(); +const runPrettierCommand = require("../../../Commands/runPrettier"); const parentWP_filePath = join( wpFolderPath, diff --git a/Tests/e2e/sortPackage.test.js b/Tests/e2e/Commands/sortPackage.test.js similarity index 86% rename from Tests/e2e/sortPackage.test.js rename to Tests/e2e/Commands/sortPackage.test.js index 5ce7d36..cbf0356 100644 --- a/Tests/e2e/sortPackage.test.js +++ b/Tests/e2e/Commands/sortPackage.test.js @@ -1,7 +1,7 @@ const fs = require("fs"); const join = require("path").join; -const wpFolderPath = require("../../Utils/folderPaths").wpFolderPath(); -const sortPackageCommand = require("../../Commands/sortPackage"); +const wpFolderPath = require("../../../Utils/folderPaths").wpFolderPath(); +const sortPackageCommand = require("../../../Commands/sortPackage"); const sortObject = require("sort-object-keys"); const packageJSON_filePath = join(wpFolderPath, "package.json");