test boundary refactoring and main() invocation (0826)
This commit is contained in:
@ -6,9 +6,9 @@
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {beforeEach, ddescribe, describe, expect, it} from '../../../core/testing/testing_internal';
|
||||
import * as html from '../../src/ml_parser/ast';
|
||||
import {HtmlParser} from '../../src/ml_parser/html_parser';
|
||||
import {beforeEach, ddescribe, describe, expect, it} from '@angular/core/testing/testing_internal';
|
||||
import * as html from '@angular/compiler/src/ml_parser/ast';
|
||||
import {HtmlParser} from '@angular/compiler/src/ml_parser/html_parser';
|
||||
|
||||
export function main() {
|
||||
describe('Node serializer', () => {
|
||||
@ -94,3 +94,5 @@ const serializerVisitor = new _SerializerVisitor();
|
||||
export function serializeNodes(nodes: html.Node[]): string[] {
|
||||
return nodes.map(node => node.visit(serializerVisitor, null));
|
||||
}
|
||||
|
||||
main();
|
||||
|
@ -6,9 +6,9 @@
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import * as html from '../../src/ml_parser/ast';
|
||||
import {ParseTreeResult} from '../../src/ml_parser/html_parser';
|
||||
import {ParseLocation} from '../../src/parse_util';
|
||||
import * as html from '@angular/compiler/src/ml_parser/ast';
|
||||
import {ParseTreeResult} from '@angular/compiler/src/ml_parser/html_parser';
|
||||
import {ParseLocation} from '@angular/compiler/src/parse_util';
|
||||
|
||||
export function humanizeDom(parseResult: ParseTreeResult, addSourceSpan: boolean = false): any[] {
|
||||
if (parseResult.errors.length > 0) {
|
||||
|
@ -6,11 +6,11 @@
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {afterEach, beforeEach, ddescribe, describe, expect, iit, it, xit} from '../../../core/testing/testing_internal';
|
||||
import * as html from '../../src/ml_parser/ast';
|
||||
import {HtmlParser, ParseTreeResult, TreeError} from '../../src/ml_parser/html_parser';
|
||||
import {TokenType} from '../../src/ml_parser/lexer';
|
||||
import {ParseError} from '../../src/parse_util';
|
||||
import {afterEach, beforeEach, ddescribe, describe, expect, iit, it, xit} from '@angular/core/testing/testing_internal';
|
||||
import * as html from '@angular/compiler/src/ml_parser/ast';
|
||||
import {HtmlParser, ParseTreeResult, TreeError} from '@angular/compiler/src/ml_parser/html_parser';
|
||||
import {TokenType} from '@angular/compiler/src/ml_parser/lexer';
|
||||
import {ParseError} from '@angular/compiler/src/parse_util';
|
||||
|
||||
import {humanizeDom, humanizeDomSourceSpans, humanizeLineColumn} from './ast_spec_utils';
|
||||
|
||||
@ -438,3 +438,5 @@ export function humanizeErrors(errors: ParseError[]): any[] {
|
||||
return [(<any>e).tokenType, e.msg, humanizeLineColumn(e.span.start)];
|
||||
});
|
||||
}
|
||||
|
||||
main();
|
||||
|
@ -6,11 +6,11 @@
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {ddescribe, describe, expect, iit, it} from '../../../core/testing/testing_internal';
|
||||
import * as html from '../../src/ml_parser/ast';
|
||||
import {HtmlParser} from '../../src/ml_parser/html_parser';
|
||||
import {ExpansionResult, expandNodes} from '../../src/ml_parser/icu_ast_expander';
|
||||
import {ParseError} from '../../src/parse_util';
|
||||
import {ddescribe, describe, expect, iit, it} from '@angular/core/testing/testing_internal';
|
||||
import * as html from '@angular/compiler/src/ml_parser/ast';
|
||||
import {HtmlParser} from '@angular/compiler/src/ml_parser/html_parser';
|
||||
import {ExpansionResult, expandNodes} from '@angular/compiler/src/ml_parser/icu_ast_expander';
|
||||
import {ParseError} from '@angular/compiler/src/parse_util';
|
||||
|
||||
import {humanizeNodes} from './ast_spec_utils';
|
||||
|
||||
@ -106,3 +106,5 @@ export function main() {
|
||||
function humanizeErrors(errors: ParseError[]): string[] {
|
||||
return errors.map(error => error.msg);
|
||||
}
|
||||
|
||||
main();
|
||||
|
@ -6,11 +6,11 @@
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {afterEach, beforeEach, ddescribe, describe, expect, iit, it, xit} from '../../../core/testing/testing_internal';
|
||||
import {getHtmlTagDefinition} from '../../src/ml_parser/html_tags';
|
||||
import {InterpolationConfig} from '../../src/ml_parser/interpolation_config';
|
||||
import * as lex from '../../src/ml_parser/lexer';
|
||||
import {ParseLocation, ParseSourceFile, ParseSourceSpan} from '../../src/parse_util';
|
||||
import {afterEach, beforeEach, ddescribe, describe, expect, iit, it, xit} from '@angular/core/testing/testing_internal';
|
||||
import {getHtmlTagDefinition} from '@angular/compiler/src/ml_parser/html_tags';
|
||||
import {InterpolationConfig} from '@angular/compiler/src/ml_parser/interpolation_config';
|
||||
import * as lex from '@angular/compiler/src/ml_parser/lexer';
|
||||
import {ParseLocation, ParseSourceFile, ParseSourceSpan} from '@angular/compiler/src/parse_util';
|
||||
|
||||
export function main() {
|
||||
describe('HtmlLexer', () => {
|
||||
@ -801,3 +801,5 @@ function tokenizeAndHumanizeErrors(input: string, tokenizeExpansionForms: boolea
|
||||
return lex.tokenize(input, 'someUrl', getHtmlTagDefinition, tokenizeExpansionForms)
|
||||
.errors.map(e => [<any>e.tokenType, e.msg, humanizeLineColumn(e.span.start)]);
|
||||
}
|
||||
|
||||
main();
|
||||
|
Reference in New Issue
Block a user