-
Notifications
You must be signed in to change notification settings - Fork 12k
Initial Web Test Runner Implementation #25860
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
7d90fbf
refactor: move `findTestFiles` to a common directory where it can be …
dgp1130 3aa36d8
refactor: update `application` builder entry points to property treat…
dgp1130 ae9a14d
feat(@angular-devkit/build-angular): initial experimental implementat…
alan-agius4 1a03530
refactor: log warnings for unsupported options in Web Test Runner
dgp1130 0d6ee13
test: add initial e2e tests of Web Test Runner builder
dgp1130 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
49 changes: 49 additions & 0 deletions
49
...ages/angular_devkit/build_angular/src/builders/web-test-runner/builder-status-warnings.ts
This file contains hidden or 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,49 @@ | ||
/** | ||
* @license | ||
* Copyright Google LLC All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
|
||
import { BuilderContext } from '@angular-devkit/architect'; | ||
import { Schema as WtrBuilderOptions } from './schema'; | ||
|
||
const UNSUPPORTED_OPTIONS: Array<keyof WtrBuilderOptions> = [ | ||
'main', | ||
'assets', | ||
'scripts', | ||
'styles', | ||
'inlineStyleLanguage', | ||
'stylePreprocessorOptions', | ||
'sourceMap', | ||
'progress', | ||
'poll', | ||
'preserveSymlinks', | ||
'browsers', | ||
'codeCoverage', | ||
'codeCoverageExclude', | ||
'fileReplacements', | ||
'webWorkerTsConfig', | ||
'watch', | ||
]; | ||
dgp1130 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
/** Logs a warning for any unsupported options specified. */ | ||
export function logBuilderStatusWarnings(options: WtrBuilderOptions, ctx: BuilderContext) { | ||
// Validate supported options | ||
for (const unsupportedOption of UNSUPPORTED_OPTIONS) { | ||
const value = (options as unknown as WtrBuilderOptions)[unsupportedOption]; | ||
|
||
if (value === undefined || value === false) { | ||
continue; | ||
} | ||
if (Array.isArray(value) && value.length === 0) { | ||
continue; | ||
} | ||
if (typeof value === 'object' && Object.keys(value).length === 0) { | ||
continue; | ||
} | ||
|
||
ctx.logger.warn(`The '${unsupportedOption}' option is not yet supported by this builder.`); | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.