From 094653d758bd9178eb9e34e1e32641895559cbc8 Mon Sep 17 00:00:00 2001 From: Jamie Tanna Date: Tue, 7 Dec 2021 08:24:30 +0000 Subject: [PATCH] Allow `npm run test` to work in isolation Instead of using the environment variables setup within the GitHub Actions workflow, we should ensure that all tests pass through `npm run test`, so it's an easier and more consistent local feedback loop. --- .github/workflows/release.yml | 3 --- .github/workflows/run-tests.yml | 3 --- package.json | 2 +- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 95899cf..014e71a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -28,9 +28,6 @@ jobs: run: npm run lint - name: Run tests - env: - ROOT_URL: http://localhost:4444/ - MEDIA_ENDPOINT_URL: http://localhost:3334/ run: npm test - name: Deploy diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 53b2823..b63ef27 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -21,7 +21,4 @@ jobs: run: npm run lint - name: Run tests - env: - MEDIA_ENDPOINT_URL: http://localhost:3334/ - ROOT_URL: http://localhost:4444/ run: npm test diff --git a/package.json b/package.json index 56abeab..9668dbb 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "Personal website Micropub server", "scripts": { "start": "PORT=3333 arc sandbox", - "test": "NODE_ENV=testing PORT=3334 tape test/*-test.js", + "test": "NODE_ENV=testing PORT=3334 MEDIA_ENDPOINT_URL=http://localhost:3334/ ROOT_URL=http://localhost:4444/ tape test/*-test.js", "lint": "standard" }, "dependencies": {