-
-
Notifications
You must be signed in to change notification settings - Fork 174
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add feature to use different working dir using --cwd and glob-based c…
…onfig
- Loading branch information
Showing
9 changed files
with
119 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import test from 'node:test'; | ||
import assert from 'node:assert/strict'; | ||
import { resolveConfig } from '../src/util'; | ||
|
||
const baseConfig = { entryFiles: ['index.ts'], filePatterns: ['*.ts'] }; | ||
|
||
test('resolveConfig (default)', async () => { | ||
const config = resolveConfig({ ...baseConfig }); | ||
assert.deepEqual(config, { entryFiles: ['index.ts'], filePatterns: ['*.ts'] }); | ||
}); | ||
|
||
test('resolveConfig (static)', async () => { | ||
const config = resolveConfig({ workspace: { ...baseConfig } }, 'workspace'); | ||
assert.deepEqual(config, { entryFiles: ['index.ts'], filePatterns: ['*.ts'] }); | ||
}); | ||
|
||
test('resolveConfig (dynamic)', async () => { | ||
const config = resolveConfig({ 'packages/*': { ...baseConfig } }, 'packages/a'); | ||
assert.deepEqual(config, { entryFiles: ['index.ts'], filePatterns: ['*.ts'] }); | ||
}); |