test(packaging): added test for source map correctness

This commit is contained in:
Kara Erickson
2017-09-07 10:16:03 -07:00
committed by Matias Niemelä
parent 9d93c859d7
commit 86f7b4170c
10 changed files with 153 additions and 8 deletions

View File

@ -8,7 +8,6 @@
const STRIP_SRC_FILE_SUFFIXES = /(\.ts|\.d\.ts|\.js|\.jsx|\.tsx)$/;
const GENERATED_FILE = /\.ngfactory\.|\.ngsummary\./;
const GENERATED_MODULE = /\.ngfactory$|\.ngsummary$/;
const JIT_SUMMARY_FILE = /\.ngsummary\./;
const JIT_SUMMARY_NAME = /NgSummary$/;

View File

@ -17,8 +17,8 @@ const _INDENT_WITH = ' ';
export const CATCH_ERROR_VAR = o.variable('error', null, null);
export const CATCH_STACK_VAR = o.variable('stack', null, null);
export abstract class OutputEmitter {
abstract emitStatements(
export interface OutputEmitter {
emitStatements(
srcFilePath: string, genFilePath: string, stmts: o.Statement[],
preamble?: string|null): string;
}

View File

@ -16,10 +16,6 @@ export const MODULE_SUFFIX = '';
const CAMEL_CASE_REGEXP = /([A-Z])/g;
const DASH_CASE_REGEXP = /-+([a-z0-9])/g;
export function camelCaseToDashCase(input: string): string {
return input.replace(CAMEL_CASE_REGEXP, (...m: any[]) => '-' + m[1].toLowerCase());
}
export function dashCaseToCamelCase(input: string): string {
return input.replace(DASH_CASE_REGEXP, (...m: any[]) => m[1].toUpperCase());
}

View File

@ -29,7 +29,6 @@ import {componentFactoryResolverProviderDef, depDef, lifecycleHookToNodeFlag, pr
const CLASS_ATTR = 'class';
const STYLE_ATTR = 'style';
const IMPLICIT_TEMPLATE_VAR = '\$implicit';
const NG_CONTAINER_TAG = 'ng-container';
export class ViewCompileResult {
constructor(public viewClassVar: string, public rendererTypeVar: string) {}