Skip to content
This repository has been archived by the owner on Oct 1, 2024. It is now read-only.

Commit

Permalink
Remove hardcoded repo directory name from test file
Browse files Browse the repository at this point in the history
  • Loading branch information
jesstelford committed Sep 18, 2024
1 parent b7a9086 commit 518b75a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/typescript-project-references.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,15 @@ describe('typescript project references', () => {
const quiltReferences = references.map(prefixPackageName);

it('includes all the packages', () => {
const packageNameRegex = new RegExp(
`${basePackagePath}/(?<packageName>[\\w._-]+)/package\\.json$`,
'i',
);
const packages = glob
.sync(resolve(basePackagePath, '*/package.json'))
.map(
(packageJsonPath) =>
/quilt\/packages\/(?<packageName>[\w._-]+)\/package\.json$/i.exec(
packageJsonPath,
).groups.packageName,
packageJsonPath.match(packageNameRegex).groups.packageName,
)
.filter((packageName) => !EXCLUDED_PACKAGES.includes(packageName));

Expand Down

0 comments on commit 518b75a

Please sign in to comment.