refactor(aio): rename method (loadContainingCustomElements --> loadContainedCustomElements) (#23944)

PR Close #23944
This commit is contained in:
George Kalpakas
2018-05-22 17:31:05 +03:00
committed by Matias Niemelä
parent 7866684f2b
commit c2e131119b
8 changed files with 13 additions and 13 deletions
@@ -33,7 +33,7 @@ describe('ElementsLoader', () => {
elementsLoader = injector.get(ElementsLoader);
});
describe('loadContainingCustomElements()', () => {
describe('loadContainedCustomElements()', () => {
let loadCustomElementSpy: jasmine.Spy;
beforeEach(() => loadCustomElementSpy = spyOn(elementsLoader, 'loadCustomElement'));
@@ -47,7 +47,7 @@ describe('ElementsLoader', () => {
<element-b-selector></element-b-selector>
`;
elementsLoader.loadContainingCustomElements(hostEl);
elementsLoader.loadContainedCustomElements(hostEl);
flushMicrotasks();
expect(loadCustomElementSpy).toHaveBeenCalledTimes(2);
@@ -63,7 +63,7 @@ describe('ElementsLoader', () => {
<element-b-selector></element-b-selector>
`;
elementsLoader.loadContainingCustomElements(hostEl);
elementsLoader.loadContainedCustomElements(hostEl);
flushMicrotasks();
expect(loadCustomElementSpy).toHaveBeenCalledTimes(1);
@@ -80,7 +80,7 @@ describe('ElementsLoader', () => {
`;
const log: any[] = [];
elementsLoader.loadContainingCustomElements(hostEl).subscribe(
elementsLoader.loadContainedCustomElements(hostEl).subscribe(
v => log.push(`emitted: ${v}`),
e => log.push(`errored: ${e}`),
() => log.push('completed'),
@@ -108,7 +108,7 @@ describe('ElementsLoader', () => {
`;
const log: any[] = [];
elementsLoader.loadContainingCustomElements(hostEl).subscribe(
elementsLoader.loadContainedCustomElements(hostEl).subscribe(
v => log.push(`emitted: ${v}`),
e => log.push(`errored: ${e}`),
() => log.push('completed'),
@@ -26,7 +26,7 @@ export class ElementsLoader {
* the browser. Custom elements that are registered will be removed from the list of unregistered
* elements so that they will not be queried in subsequent calls.
*/
loadContainingCustomElements(element: HTMLElement): Observable<void> {
loadContainedCustomElements(element: HTMLElement): Observable<void> {
const unregisteredSelectors = Array.from(this.elementsToLoad.keys())
.filter(s => element.querySelector(s));
@@ -11,7 +11,7 @@ describe('LazyCustomElementComponent', () => {
beforeEach(() => {
mockElementsLoader = jasmine.createSpyObj<ElementsLoader>('ElementsLoader', [
'loadContainingCustomElements',
'loadContainedCustomElements',
'loadCustomElement',
]);