Skip to content

Commit

Permalink
fix: run missing edge test for real without EDGE_PATH hack
Browse files Browse the repository at this point in the history
  • Loading branch information
Kelly Selden committed Oct 5, 2022
1 parent 18c8d30 commit 3e8efa7
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 10 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 0 additions & 6 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 0 additions & 2 deletions test/helpers/edge.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
'use strict';

const oldVersion = '102.0.1245.33';
const missingPath = 'missing-edge';

module.exports = {
oldVersion,
missingPath,
};
2 changes: 0 additions & 2 deletions test/no-edge/install-msedgedriver-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -26,7 +25,6 @@ describe(path.basename(installerPath), function() {
let ps = await execa.node(installerPath, [], {
env: {
DETECT_EDGEDRIVER_VERSION: 'true',
EDGE_PATH: missingPath,
},
});

Expand Down

0 comments on commit 3e8efa7

Please sign in to comment.