From 1024aabea90d16dc6c3960bf8c020d48274584ff Mon Sep 17 00:00:00 2001 From: Thomas Watson Date: Mon, 26 Aug 2024 12:59:16 +0200 Subject: [PATCH] Refactor integration test helpers This commit performs three operations: 1. Move `integration-tests/helpers.js` to `integration-tests/helpers/index.js`. 2. Move `FakeAgent` from inside `integration-tests/helpers/index.js` to its own file called `integration-tests/helpers/fake_agent.js`. 3. Move the setting up of the Express app inside the `FakeAgent.start` method to a private helper function. --- integration-tests/helpers/index.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/integration-tests/helpers/index.js b/integration-tests/helpers/index.js index b8f55704a3b..f451a4364ce 100644 --- a/integration-tests/helpers/index.js +++ b/integration-tests/helpers/index.js @@ -338,11 +338,6 @@ function sandboxCwd () { return sandbox.folder } -function base64 (strOrObj) { - const str = typeof strOrObj === 'string' ? strOrObj : JSON.stringify(strOrObj) - return Buffer.from(str).toString('base64') -} - module.exports = { FakeAgent, spawnProc,