Skip to content

Commit

Permalink
fix globby api after upgrading
Browse files Browse the repository at this point in the history
  • Loading branch information
koddsson committed Aug 15, 2023
1 parent 3c3bb6e commit 895b368
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import globby from 'globby';
import { globby } from 'globby';
import path from 'path';

import { createBrowserImport, createError } from '../utils.js';
Expand Down
4 changes: 2 additions & 2 deletions packages/test-runner-core/src/runner/collectTestFiles.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import globby from 'globby';
import { globbySync } from 'globby';
import { sep } from 'path';

export function collectTestFiles(patterns: string | string[], baseDir = process.cwd()) {
const normalizedPatterns = [patterns].flat().map(p => p.split(sep).join('/'));
return globby.sync(normalizedPatterns, { cwd: baseDir, absolute: true });
return globbySync(normalizedPatterns, { cwd: baseDir, absolute: true });
}
4 changes: 2 additions & 2 deletions packages/test-runner/src/config/collectGroupConfigs.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { TestRunnerGroupConfig } from '@web/test-runner-core';
import { readConfig, ConfigLoaderError } from '@web/config-loader';
import globby from 'globby';
import { globbySync } from 'globby';
import { TestRunnerStartError } from '../TestRunnerStartError';

function validateGroupConfig(configFilePath: string, config: Partial<TestRunnerGroupConfig>) {
Expand All @@ -24,7 +24,7 @@ export async function collectGroupConfigs(patterns: string[]) {
const groupConfigs: TestRunnerGroupConfig[] = [];

for (const pattern of patterns) {
const filePaths = globby.sync(pattern, { absolute: true });
const filePaths = globbySync(pattern, { absolute: true });
for (const filePath of filePaths) {
groupConfigFiles.add(filePath);
}
Expand Down

0 comments on commit 895b368

Please sign in to comment.