From 3e8efa72d640ad4e27f529b0181d20abd0de3471 Mon Sep 17 00:00:00 2001 From: Kelly Selden Date: Wed, 5 Oct 2022 16:56:10 -0700 Subject: [PATCH] fix: run missing edge test for real without EDGE_PATH hack --- .github/workflows/ci.yml | 5 +++++ src/index.js | 6 ------ test/helpers/edge.js | 2 -- test/no-edge/install-msedgedriver-test.js | 2 -- 4 files changed, 5 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2442046..1c97034 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -79,6 +79,11 @@ jobs: with: node-version: ${{ matrix.node }} + - run: sudo rm $(which microsoft-edge) + if: matrix.os == 'ubuntu-latest' + - run: rm '/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge' + if: matrix.os == 'macos-latest' + - run: yarn install --frozen-lockfile - run: yarn test --config .mocharc.no-edge.js diff --git a/src/index.js b/src/index.js index 0677b80..fffa930 100644 --- a/src/index.js +++ b/src/index.js @@ -67,12 +67,6 @@ async function getDetectedDriverVersion() { let version; let browserCmd = (() => { - let edgePathOverride = process.env.EDGE_PATH; - - if (edgePathOverride) { - return edgePathOverride; - } - switch (platform) { case 'linux': return 'microsoft-edge'; case 'darwin': return '/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge'; diff --git a/test/helpers/edge.js b/test/helpers/edge.js index a035e60..37051ad 100644 --- a/test/helpers/edge.js +++ b/test/helpers/edge.js @@ -1,9 +1,7 @@ 'use strict'; const oldVersion = '102.0.1245.33'; -const missingPath = 'missing-edge'; module.exports = { oldVersion, - missingPath, }; diff --git a/test/no-edge/install-msedgedriver-test.js b/test/no-edge/install-msedgedriver-test.js index 635b567..eca4845 100644 --- a/test/no-edge/install-msedgedriver-test.js +++ b/test/no-edge/install-msedgedriver-test.js @@ -6,7 +6,6 @@ const execa = require('execa'); const fs = require('fs').promises; const { getDriverPath } = require('../../src'); const path = require('path'); -const { missingPath } = require('../helpers/edge'); const installerPath = require.resolve('../../bin/install-msedgedriver'); const driverPath = getDriverPath(); @@ -26,7 +25,6 @@ describe(path.basename(installerPath), function() { let ps = await execa.node(installerPath, [], { env: { DETECT_EDGEDRIVER_VERSION: 'true', - EDGE_PATH: missingPath, }, });