refactor: fix typos (#18000)

This commit is contained in:
Victor Berchet
2017-07-07 16:55:17 -07:00
committed by Jason Aden
parent 9dd550fa1e
commit c723d42d0a
41 changed files with 48 additions and 50 deletions

View File

@ -203,7 +203,7 @@ export function main() {
/Unable to listen on the animation trigger "myTrigger" because the provided event is undefined!/);
});
it('should retain event listeners and call them for sucessive animation state changes',
it('should retain event listeners and call them for successive animation state changes',
() => {
const engine = makeEngine();
const trig = trigger(
@ -282,7 +282,7 @@ export function main() {
'* => *', [style({height: '0px'}), animate(1234, style({height: '100px'}))])
]));
// we do this so that the next transition has a starting value that isnt null
// we do this so that the next transition has a starting value that isn't null
setProperty(element, engine, 'myTrigger', '123');
engine.flush();

View File

@ -110,7 +110,7 @@ export class ChromeDriverExtension extends WebDriverExtension {
categories, name, ['benchmark'],
'BenchmarkInstrumentation::ImplThreadRenderingStats')) {
// TODO(goderbauer): Instead of BenchmarkInstrumentation::ImplThreadRenderingStats the
// following events should be used (if available) for more accurate measurments:
// following events should be used (if available) for more accurate measurements:
// 1st choice: vsync_before - ground truth on Android
// 2nd choice: BenchmarkInstrumentation::DisplayRenderingStats - available on systems with
// new surfaces framework (not broadly enabled yet)

View File

@ -45,7 +45,7 @@ import {Directive, EmbeddedViewRef, Input, TemplateRef, ViewContainerRef} from '
* A common pattern is that we need to show a set of properties from the same object. If the
* object is undefined, then we have to use the safe-traversal-operator `?.` to guard against
* dereferencing a `null` value. This is especially the case when waiting on async data such as
* when using the `async` pipe as shown in folowing example:
* when using the `async` pipe as shown in following example:
*
* ```
* Hello {{ (userStream|async)?.last }}, {{ (userStream|async)?.first }}!

View File

@ -166,7 +166,7 @@ class ToJsonSerializer extends ValueTransformer {
__symbol: index,
name: symbol.name,
// We convert the source filenames tinto output filenames,
// as the generated summary file will be used when teh current
// as the generated summary file will be used when the current
// compilation unit is used as a library
filePath: this.summaryResolver.getLibraryFileName(symbol.filePath),
importAs: importAs

View File

@ -417,7 +417,7 @@ export function main() {
expect((ast.rootNodes[0] as html.Element).attrs[0].valueSpan).toBeUndefined();
});
it('should report a value span for an attibute with a value', () => {
it('should report a value span for an attribute with a value', () => {
const ast = parser.parse('<div bar="12"></div>', 'TestComp');
const attr = (ast.rootNodes[0] as html.Element).attrs[0];
expect(attr.valueSpan !.start.offset).toEqual(9);

View File

@ -89,7 +89,7 @@ export interface ViewHandleEventFn {
}
/**
* Bitmask for ViewDefintion.flags.
* Bitmask for ViewDefinition.flags.
*/
export const enum ViewFlags {
None = 0,

View File

@ -242,14 +242,14 @@ function declareTests({useJit}: {useJit: boolean}) {
return MyComponent;
}
const HeroComponent = ComponentFactory('my-hero', 'my hero');
const VillianComponent = ComponentFactory('a-villian', 'a villian');
const VillainComponent = ComponentFactory('a-villain', 'a villain');
const MainComponent = ComponentFactory(
'my-app', 'I was saved by <my-hero></my-hero> from <a-villian></a-villian>.');
'my-app', 'I was saved by <my-hero></my-hero> from <a-villain></a-villain>.');
TestBed.configureTestingModule(
{declarations: [HeroComponent, VillianComponent, MainComponent]});
{declarations: [HeroComponent, VillainComponent, MainComponent]});
const fixture = TestBed.createComponent(MainComponent);
expect(fixture.nativeElement).toHaveText('I was saved by my hero from a villian.');
expect(fixture.nativeElement).toHaveText('I was saved by my hero from a villain.');
});
it('should allow to use the renderer outside of views', () => {

View File

@ -123,7 +123,7 @@ export function main() {
});
it('should ensure that we dont accidently patch native objects', () => {
it('should ensure that we dont accidentally patch native objects', () => {
expect(() => {
(<Function>Class)({constructor: Object});
}).toThrowError('Can not use native Object as constructor');

View File

@ -172,7 +172,7 @@ export function main() {
.toThrowError('No provider for Dep!');
});
it('should inject from a parent elment in a parent view', () => {
it('should inject from a parent element in a parent view', () => {
createAndGetRootNodes(compViewDef([
elementDef(
NodeFlags.None, null !, null !, 1, 'div', null !, null !, null !, null !,

View File

@ -25,7 +25,7 @@ export {
/**
* The information `LanguageService` needs from the `LanguageServiceHost` to describe the content of
* a template and the langauge context the template is in.
* a template and the language context the template is in.
*
* A host interface; see `LanguageSeriviceHost`.
*

View File

@ -30,7 +30,7 @@ describe('service without angular', () => {
() => expect(() => ngService.getDiagnostics(fileName)).not.toThrow());
it('should not crash a completion',
() => expect(() => ngService.getCompletionsAt(fileName, position)).not.toThrow());
it('should not crash a get defintion',
it('should not crash a get definition',
() => expect(() => ngService.getDefinitionAt(fileName, position)).not.toThrow());
it('should not crash a hover', () => expect(() => ngService.getHoverAt(fileName, position)));
});

View File

@ -142,7 +142,7 @@ describe('plugin', () => {
it('should reference the component',
() => { contains('app/parsing-cases.ts', 'test-comp-after-test', 'name'); });
// TODO: Enable when we have a flag that indicates the project targets the DOM
// it('should refernce the element if no component', () => {
// it('should reference the element if no component', () => {
// contains('app/parsing-cases.ts', 'test-comp-after-div', 'innerText');
// });
});
@ -163,7 +163,7 @@ describe('plugin', () => {
'app/expression-cases.ts', 'myField',
'Identifier \'myField\' refers to a private member of the component');
});
it('should report numeric operator erros',
it('should report numeric operator errors',
() => { expectSemanticError('app/expression-cases.ts', 'mod', 'Expected a numeric type'); });
describe('in ngFor', () => {
function expectError(locationMarker: string, message: string) {

View File

@ -31,7 +31,7 @@ class FancyService {
class ExternalTemplateComp {
}
@Component({selector: 'bad-template-comp', templateUrl: 'non-existant.html'})
@Component({selector: 'bad-template-comp', templateUrl: 'non-existent.html'})
class BadTemplateUrl {
}
@ -110,7 +110,7 @@ export function main() {
() => { done.fail('Expected test to fail, but it did not'); },
(err: any) => {
expect(err.message)
.toEqual('Uncaught (in promise): Failed to load non-existant.html');
.toEqual('Uncaught (in promise): Failed to load non-existent.html');
done();
});
restoreJasmineIt();

View File

@ -102,7 +102,7 @@ const HTML_ATTRS = tagSet(
'scope,scrolling,shape,size,sizes,span,srclang,start,summary,tabindex,target,title,translate,type,usemap,' +
'valign,value,vspace,width');
// NB: This currently conciously doesn't support SVG. SVG sanitization has had several security
// NB: This currently consciously doesn't support SVG. SVG sanitization has had several security
// issues in the past, so it seems safer to leave it out if possible. If support for binding SVG via
// innerHTML is required, SVG attributes should be added here.

View File

@ -84,7 +84,7 @@ export interface MessageBusSink {
* Sets up a new channel on the MessageBusSink.
* MUST be called before calling to on the channel.
* If runInZone is true the sink will buffer messages and send only once the zone exits.
* if runInZone is false the sink will send messages immediatly.
* if runInZone is false the sink will send messages immediately.
*/
initChannel(channel: string, runInZone: boolean): void;

View File

@ -142,7 +142,7 @@ export function main() {
}),
500);
it('should send messages immediatly when run outside the zone',
it('should send messages immediately when run outside the zone',
inject([AsyncTestCompleter, NgZone], (async: AsyncTestCompleter, zone: MockNgZone) => {
bus = createConnectedMessageBus();
setup(false, zone);

View File

@ -149,7 +149,7 @@ export class UrlSegmentGroup {
forEach(children, (v: any, k: any) => v.parent = this);
}
/** Wether the segment has child segments */
/** Whether the segment has child segments */
hasChildren(): boolean { return this.numberOfChildren > 0; }
/** Number of child segments */

View File

@ -509,7 +509,7 @@ describe('Integration', () => {
expect(fixture.nativeElement).toHaveText('team 22 [ user victor, right: simple ]');
})));
it('should support secondary routes in seperate commands',
it('should support secondary routes in separate commands',
fakeAsync(inject([Router], (router: Router) => {
const fixture = createRoot(router, RootCmp);