refactor(ivy): rename "blacklist" to "blocklist" (#28536)
PR Close #28536
This commit is contained in:
parent
9ef8d2b823
commit
76a6eacb4e
@ -296,7 +296,7 @@ import {el} from '../../../testing/src/browser_util';
|
|||||||
expect(receivedEvents).toEqual([]);
|
expect(receivedEvents).toEqual([]);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should run blackListedEvents handler outside of ngZone', () => {
|
it('should run blockListedEvents handler outside of ngZone', () => {
|
||||||
const Zone = (window as any)['Zone'];
|
const Zone = (window as any)['Zone'];
|
||||||
const element = el('<div><div></div></div>');
|
const element = el('<div><div></div></div>');
|
||||||
getDOM().appendChild(doc.body, element);
|
getDOM().appendChild(doc.body, element);
|
||||||
|
@ -28,9 +28,9 @@ cp -r ${angular_dir}/dist/packages-dist-ivy-aot/* /tmp/material2/node_modules/@a
|
|||||||
# For angular/angular, we only want to run the local tests.
|
# For angular/angular, we only want to run the local tests.
|
||||||
export TEST_PLATFORM=local
|
export TEST_PLATFORM=local
|
||||||
|
|
||||||
# Append the test blacklist into angular/material2's karma-test-shim.js.
|
# Append the test blocklist into angular/material2's karma-test-shim.js.
|
||||||
# This filters out known-failing tests because the goal is to prevent regressions.
|
# This filters out known-failing tests because the goal is to prevent regressions.
|
||||||
cat ${angular_dir}/tools/material-ci/angular_material_test_blacklist.js >> /tmp/material2/test/karma-test-shim.js
|
cat ${angular_dir}/tools/material-ci/angular_material_test_blocklist.js >> /tmp/material2/test/karma-test-shim.js
|
||||||
|
|
||||||
# Now actually run the tests.
|
# Now actually run the tests.
|
||||||
yarn gulp test:single-run
|
yarn gulp test:single-run
|
||||||
|
@ -7,8 +7,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Blacklist of unit tests from angular/material2 with ivy that are skipped when running on
|
* Blocklist of unit tests from angular/material2 with ivy that are skipped when running on
|
||||||
* angular/angular. As bugs are resolved, items should be removed from this blacklist.
|
* angular/angular. As bugs are resolved, items should be removed from this blocklist.
|
||||||
*
|
*
|
||||||
* The `notes` section should be used to keep track of specific issues associated with the failures.
|
* The `notes` section should be used to keep track of specific issues associated with the failures.
|
||||||
*/
|
*/
|
||||||
@ -16,7 +16,7 @@
|
|||||||
// clang-format off
|
// clang-format off
|
||||||
// tslint:disable
|
// tslint:disable
|
||||||
|
|
||||||
window.testBlacklist = {
|
window.testBlocklist = {
|
||||||
"Portals CdkPortalOutlet should load a template into the portal": {
|
"Portals CdkPortalOutlet should load a template into the portal": {
|
||||||
"error": "TypeError: Cannot read property 'createEmbeddedView' of undefined",
|
"error": "TypeError: Cannot read property 'createEmbeddedView' of undefined",
|
||||||
"notes": "Unknown"
|
"notes": "Unknown"
|
@ -1,9 +1,9 @@
|
|||||||
### Unit tests for Angular CDK/Material
|
### Unit tests for Angular CDK/Material
|
||||||
The unit tests from angular/material2 run on CircleCI under the `material-unit-tests` job.
|
The unit tests from angular/material2 run on CircleCI under the `material-unit-tests` job.
|
||||||
Known failing tests are skipped based on the blacklist in
|
Known failing tests are skipped based on the blocklist in
|
||||||
`tools/material-ci/angular_material_test_blacklist.js`. Whenever the root cause of a known failure
|
`tools/material-ci/angular_material_test_blocklist.js`. Whenever the root cause of a known failure
|
||||||
is identified, the `notes` field for the corresponding tests should be updated. Whenever a failure
|
is identified, the `notes` field for the corresponding tests should be updated. Whenever a failure
|
||||||
is resolved, the corresponding tests should be removed from the blacklist.
|
is resolved, the corresponding tests should be removed from the blocklist.
|
||||||
|
|
||||||
### Debugging
|
### Debugging
|
||||||
To debug a failure, you need to work against the angular/material2 repo:
|
To debug a failure, you need to work against the angular/material2 repo:
|
||||||
@ -13,12 +13,12 @@ To debug a failure, you need to work against the angular/material2 repo:
|
|||||||
4. Run `scripts/ivy/install-angular.sh path/to/local/angular/repo`
|
4. Run `scripts/ivy/install-angular.sh path/to/local/angular/repo`
|
||||||
5. Run `gulp test`
|
5. Run `gulp test`
|
||||||
|
|
||||||
### Regenerating the blacklist
|
### Regenerating the blocklist
|
||||||
If a problem has been fixed, you can regenerate the blacklist by:
|
If a problem has been fixed, you can regenerate the blocklist by:
|
||||||
1. Clone `angular/material2`
|
1. Clone `angular/material2`
|
||||||
2. Checkout the `ivy-2019` branch
|
2. Checkout the `ivy-2019` branch
|
||||||
3. Run `yarn`
|
3. Run `yarn`
|
||||||
4. Run `scripts/ivy/install-angular.sh path/to/local/angular/repo`
|
4. Run `scripts/ivy/install-angular.sh path/to/local/angular/repo`
|
||||||
5. Run `gulp test`. Let it finish. It will take a few minutes.
|
5. Run `gulp test`. Let it finish. It will take a few minutes.
|
||||||
6. Run `scripts/ivy/generate-blacklist.js`
|
6. Run `scripts/ivy/generate-blocklist.js`
|
||||||
7. Copy the new blacklist from `dist/angular_material_test_blacklist.js`
|
7. Copy the new blocklist from `dist/angular_material_test_blocklist.js`
|
||||||
|
@ -17,8 +17,8 @@ function _isRollupPath(path: string) {
|
|||||||
return /rollup\.config\.js$/.test(path);
|
return /rollup\.config\.js$/.test(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Regexes to blacklist.
|
// Regexes to blocklist.
|
||||||
const sourceFilePathBlacklist = [
|
const sourceFilePathBlocklist = [
|
||||||
/\.spec\.ts$/,
|
/\.spec\.ts$/,
|
||||||
/_spec\.ts$/,
|
/_spec\.ts$/,
|
||||||
/_perf\.ts$/,
|
/_perf\.ts$/,
|
||||||
@ -62,7 +62,7 @@ const packageScopedImportWhitelist: [RegExp, string[]][] = [
|
|||||||
|
|
||||||
// Return true if the file should be linted.
|
// Return true if the file should be linted.
|
||||||
function _pathShouldBeLinted(path: string) {
|
function _pathShouldBeLinted(path: string) {
|
||||||
return /[/\\]packages[/\\]/.test(path) && sourceFilePathBlacklist.every(re => !re.test(path));
|
return /[/\\]packages[/\\]/.test(path) && sourceFilePathBlocklist.every(re => !re.test(path));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -157,7 +157,7 @@ export class Rule extends AbstractRule {
|
|||||||
sourceFile, importStatement.getStart(), importStatement.getWidth(),
|
sourceFile, importStatement.getStart(), importStatement.getWidth(),
|
||||||
`Import ${JSON.stringify(modulePath)} could not be found in the rollup config ` +
|
`Import ${JSON.stringify(modulePath)} could not be found in the rollup config ` +
|
||||||
`at path ${JSON.stringify(rollupFilePath)}.`,
|
`at path ${JSON.stringify(rollupFilePath)}.`,
|
||||||
this.ruleName, );
|
this.ruleName);
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user