diff --git a/.github/workflows/backend-tests.yml b/.github/workflows/backend-tests.yml index 90a663f3..5c7907f6 100644 --- a/.github/workflows/backend-tests.yml +++ b/.github/workflows/backend-tests.yml @@ -12,7 +12,7 @@ jobs: strategy: matrix: - node-version: [14.x] + node-version: [16.x] steps: - uses: actions/checkout@v2 @@ -26,5 +26,5 @@ jobs: with: path: '**/node_modules' key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} - - run: yarn workspace backend install + - run: yarn install - run: yarn test:backend diff --git a/packages/backend/services/plausible.js b/packages/backend/services/plausible.js index c49fa63b..826168f6 100644 --- a/packages/backend/services/plausible.js +++ b/packages/backend/services/plausible.js @@ -4,6 +4,8 @@ const axios = require("axios"); const PLAUSIBLE_EVENT_ENDPOINT = "https://plausible.io/api/event"; const trackPlausibleEvent = async (eventName, props, request) => { + if (typeof jest !== "undefined") return; + const payload = { domain: "speedrunethereum.com", name: eventName,