Skip to content

Commit

Permalink
Correct types: src/host/plan-from.js
Browse files Browse the repository at this point in the history
  • Loading branch information
jugglinmike committed May 22, 2024
1 parent cbf28fe commit 261a446
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions src/host/plan-from.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
// @ts-nocheck
/// <reference path="../shared/file-record-types.js" />
/// <reference path="types.js" />

/**
* @module host
*/

import child_process from 'child_process';
import path from 'path';
import * as child_process from 'child_process';
import * as path from 'path';
import { fileURLToPath } from 'url';

import { compileGlob } from '../shared/file-glob.js';
Expand Down Expand Up @@ -39,7 +38,7 @@ function planFromRecord(record) {
* @param {string} options.pattern
* @returns {AriaATCIHost.TestPlan}
*/
function planSelectTests(plan, { pattern = '{,**/}test*' } = {}) {
function planSelectTests(plan, { pattern = '{,**/}test*' }) {
const isTestFile = compileGlob(pattern);
for (const { name } of plan.files) {
if (isTestFile(name)) {
Expand Down
2 changes: 1 addition & 1 deletion src/shared/file-glob.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import { Minimatch } from 'minimatch';
* - '**' match everything
*
* @param {string} glob a fs-like glob to test paths with
* @returns {function(string, boolean): boolean}
* @returns {(path: string, partial?: boolean) => boolean}
*/
export function compileGlob(glob) {
const match = new Minimatch(glob);
Expand Down

0 comments on commit 261a446

Please sign in to comment.