-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4eae1c6
commit 02ceed0
Showing
10 changed files
with
247 additions
and
28 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 |
---|---|---|
|
@@ -32,6 +32,7 @@ | |
npm-debug.log | ||
yarn-error.log | ||
testem.log | ||
.npmrc | ||
/typings | ||
|
||
# System Files | ||
|
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,2 @@ | ||
; Set a new registry for a scoped package | ||
@nx-dotnet:registry=http://localhost:4873 |
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 |
---|---|---|
@@ -1 +1,34 @@ | ||
export interface TestExecutorSchema {} // eslint-disable-line | ||
export interface TestExecutorSchema { | ||
testAdapterPath?: string; | ||
blame?: boolean; | ||
blameCrash?: boolean; | ||
blameCrashDumpType?: string; | ||
blameCrashCollectAlways?: boolean; | ||
blameHang?: boolean; | ||
blameHangDumpType?: string; | ||
blameHangTimeout?: string; | ||
configuration?: string; | ||
collect?: string; | ||
diag?: string; | ||
framework?: string; | ||
filter?: string; | ||
logger?: string; | ||
noBuild?: boolean; | ||
noRestore?: boolean; | ||
output?: string; | ||
resultsDirectory?: string; | ||
runtime?: string; | ||
settings?: string; | ||
listTests?: boolean; | ||
verbosity?: | ||
| 'quiet' | ||
| 'q' | ||
| 'm' | ||
| 'minimal' | ||
| 'n' | ||
| 'normal' | ||
| 'd' | ||
| 'detailed' | ||
| 'diag' | ||
| 'diagnostic'; | ||
} |
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
36 changes: 25 additions & 11 deletions
36
packages/dotnet/src/lib/models/dotnet-test/dotnet-test-flags.ts
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 |
---|---|---|
@@ -1,22 +1,36 @@ | ||
export type dotnetTestFlags = | ||
| 'blame-crash-collect-always' | ||
| 'blame-crash-dump-type' | ||
| 'blame-crash' | ||
| 'blame-hang-dump' | ||
| 'blame-hang-timeout' | ||
| 'blame-hang' | ||
| 'blameCrashCollectAlways' | ||
| 'blameCrashDumpType' | ||
| 'blameCrash' | ||
| 'blameHangDump' | ||
| 'blameHangTimeout' | ||
| 'blameHang' | ||
| 'blame' | ||
| 'collect' | ||
| 'configuration' | ||
| 'diag' | ||
| 'filter' | ||
| 'framework' | ||
| 'list-tests' | ||
| 'listTests' | ||
| 'logger' | ||
| 'no-build' | ||
| 'no-restore' | ||
| 'noBuild' | ||
| 'noRestore' | ||
| 'nologo' | ||
| 'results-directory' | ||
| 'resultsDirectory' | ||
| 'settings' | ||
| 'test-adapter-path' | ||
| 'testAdapterPath' | ||
| 'verbosity'; | ||
|
||
export const testKeyMap: Partial<{ [key in dotnetTestFlags]: string }> = { | ||
blameCrashCollectAlways: 'blame-crash-collect-always', | ||
blameCrash: 'blame-crash', | ||
blameCrashDumpType: 'blame-crash-dump-type', | ||
blameHangDump: 'blame-hang-dump', | ||
blameHang: 'blame-hang', | ||
blameHangTimeout: 'blame-hang-timeout', | ||
listTests: 'list-tests', | ||
noBuild: 'no-build', | ||
noRestore: 'no-restore', | ||
resultsDirectory: 'results-directory', | ||
testAdapterPath: 'test-adapter-path', | ||
}; |
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 |
---|---|---|
@@ -1,3 +1,27 @@ | ||
export function isDryRun(): boolean { | ||
return process.argv.some((x) => x === '--dry-run'); | ||
} | ||
|
||
export function swapKeysUsingMap( | ||
object: Record<string, unknown>, | ||
map: Record<string, string> | ||
): Record<string, unknown> { | ||
return Object.fromEntries( | ||
Object.entries(object).map(([key, value]) => [ | ||
key in map ? map[key] : key, | ||
value, | ||
]) | ||
); | ||
} | ||
|
||
export function swapArrayFieldValueUsingMap<T>( | ||
array: T[], | ||
field: keyof T, | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
map: any | ||
) { | ||
return array.map((x) => ({ | ||
...x, | ||
field: map[x[field]] ?? x[field], | ||
})); | ||
} |
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