-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build(deps): bump @flex-development/mlly from 1.0.0-alpha.19 to 1.0.0…
…-alpha.20 Signed-off-by: Lexus Drumgold <[email protected]>
- Loading branch information
1 parent
bace4e8
commit cb96350
Showing
18 changed files
with
485 additions
and
472 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,7 @@ kaisugi | |
ksort | ||
lcov | ||
mkbuild | ||
nocase | ||
nvmrc | ||
pkgs | ||
preid | ||
|
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,80 @@ | ||
/** | ||
* @file Unit Tests - matchFiles | ||
* @module tsconfig-utils/internal/tests/unit/matchFiles | ||
*/ | ||
|
||
import testSubject from '#internal/match-files' | ||
import toPath from '#internal/to-path' | ||
import createModuleResolutionHost from '#lib/create-module-resolution-host' | ||
import * as mlly from '@flex-development/mlly' | ||
import type { FileSystem } from '@flex-development/tsconfig-utils' | ||
import { alphabetize, identity } from '@flex-development/tutils' | ||
import ts from 'typescript' | ||
import tsconfig from '../../../tsconfig.json' with { type: 'json' } | ||
|
||
describe('unit:internal/matchFiles', () => { | ||
it.each<[ | ||
id: mlly.ModuleId, | ||
extensions: Set<string> | readonly string[] | undefined, | ||
exclude: Set<string> | readonly string[] | undefined, | ||
include: Set<string> | readonly string[] | undefined, | ||
useCaseSensitiveFileNames?: boolean | null | undefined, | ||
depth?: number | null | undefined, | ||
fs?: FileSystem | null | undefined | ||
]>([ | ||
[ | ||
new URL('src', mlly.cwd()), | ||
['.cjs', '.cts', '.js', '.json', '.mjs', '.mts', '.ts'], | ||
tsconfig.exclude, | ||
tsconfig.include, | ||
null, | ||
0 | ||
], | ||
[ | ||
mlly.cwd(), | ||
['.cjs', '.cts', '.js', '.json', '.mjs', '.mts', '.ts'], | ||
tsconfig.exclude, | ||
tsconfig.include | ||
], | ||
[ | ||
mlly.cwd(), | ||
['.mjs', '.mts', '.ts'], | ||
tsconfig.exclude, | ||
tsconfig.include, | ||
undefined, | ||
1 | ||
] | ||
])('should return list of files under directory at `id` (%#)', ( | ||
id, | ||
extensions, | ||
exclude, | ||
include, | ||
useCaseSensitiveFileNames, | ||
depth, | ||
fs | ||
) => { | ||
// Arrange | ||
const expected: readonly string[] = alphabetize(ts.sys.readDirectory( | ||
toPath(id), | ||
extensions ? [...extensions] : undefined, | ||
exclude ? [...exclude] : undefined, | ||
include ? [...include] : undefined, | ||
depth ?? undefined | ||
), identity) | ||
|
||
// Act | ||
const result = testSubject( | ||
createModuleResolutionHost(), | ||
id, | ||
extensions, | ||
exclude, | ||
include, | ||
useCaseSensitiveFileNames, | ||
depth, | ||
fs | ||
) | ||
|
||
// Expect | ||
expect(result).to.be.an('array').and.eql(expected).and.not.be.frozen | ||
}) | ||
}) |
Oops, something went wrong.