diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 222955df..c30e64a3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,12 +14,12 @@ jobs: matrix: # macOS-13 is the latest macOS version that is x86. # Node.js 12, 14 and 16 aren’t support on the arm64 runners. - os: [ubuntu-latest, macOS-13, windows-latest] - node-version: [12.x, 14.x, 16.x, 18.x, 20.x, 22.x] + os: [windows-latest] + node-version: [22.x] # Also have a test on macOS arm64. - include: - - os: macOS-latest - node-version: 22.x + # include: + # - os: macOS-latest + # node-version: 22.x env: ELM_HOME: '${{ github.workspace }}/elm-stuff/elm-home' @@ -51,7 +51,6 @@ jobs: NO_ELM_TOOLING_INSTALL: 1 - name: install glob 8 - if: steps.cache-node_modules.outputs.cache-hit != 'true' && (matrix.node-version == '12.x' || matrix.node-version == '14.x') run: npm install glob@8 - name: install mocha 9 diff --git a/lib/FindTests.js b/lib/FindTests.js index 58b0c4b2..4fdaecef 100644 --- a/lib/FindTests.js +++ b/lib/FindTests.js @@ -71,7 +71,7 @@ function resolveCliArgGlob( // https://github.com/isaacs/minimatch/commit/9104d8d175bdd8843338103be1401f80774d2a10#diff-f41746899d033115e03bebe4fbde76acf2de4bf261bfb221744808f4c8a286cf const pattern = process.platform === 'win32' - ? globRelativeToProjectRoot.replace(/\\/g, '/') + ? globRelativeToProjectRoot //.replace(/\\/g, '/') : globRelativeToProjectRoot; return glob @@ -84,9 +84,10 @@ function resolveCliArgGlob( nodir: false, mark: true, }) - .flatMap((filePath) => - filePath.endsWith('/') ? findAllElmFilesInDir(filePath) : filePath - ); + .flatMap((filePath) => { + console.log('### filePath', filePath); + return filePath.endsWith('/') ? findAllElmFilesInDir(filePath) : filePath; + }); } // Recursively search for *.elm files. diff --git a/tests/flags.js b/tests/flags.js index 227bb1a6..1d58073c 100644 --- a/tests/flags.js +++ b/tests/flags.js @@ -704,6 +704,13 @@ describe('flags', () => { ]); assert.strictEqual(runResult.status, 0); }).timeout(60000); + + it('Should find all Elm files inside the directory that a glob resolves to', () => { + // This is nice if two globs accidentally intersect. + const runResult = execElmTest(['tests/Pass*']); + console.log(runResult); + assert.strictEqual(runResult.status, 0); + }).timeout(60000); }); describe('unknown flags', () => {