Skip to content

Commit

Permalink
more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
thorn0 committed Apr 6, 2020
1 parent 9cf17a2 commit da6a51a
Show file tree
Hide file tree
Showing 3 changed files with 151 additions and 0 deletions.
108 changes: 108 additions & 0 deletions tests/typescript_as/__snapshots__/jsfmt.spec.js.snap
Expand Up @@ -188,6 +188,76 @@ this.intervalID = (setInterval(() => {
================================================================================
`;
exports[`assignment2.ts 1`] = `
====================================options=====================================
parsers: ["typescript"]
printWidth: 80
| printWidth
=====================================input======================================
const defaultMaskGetter = $parse(attrs[directiveName]) as (
scope: ng.IScope
) => Mask;
(this.configuration as any) = (this.editor as any) = (this
.editorBody as any) = undefined;
angular.module("foo").directive("formIsolator", () => {
return {
name: "form",
controller: class FormIsolatorController {
$addControl = angular.noop;
} as ng.IControllerConstructor,
};
});
(this.selectorElem as any) = this.multiselectWidget = this.initialValues = undefined;
const extraRendererAttrs = ((attrs.rendererAttrs &&
this.utils.safeParseJsonString(attrs.rendererAttrs)) ||
Object.create(null)) as FieldService.RendererAttributes;
const annotate = (angular.injector as any).$$annotate as (
fn: Function
) => string[];
const originalPrototype = originalConstructor.prototype as TComponent & InjectionTarget,
propertyToServiceName = originalPrototype._inject;
=====================================output=====================================
const defaultMaskGetter = $parse(attrs[directiveName]) as (
scope: ng.IScope
) => Mask;
(this.configuration as any) = (this.editor as any) = (this
.editorBody as any) = undefined;
angular.module("foo").directive("formIsolator", () => {
return {
name: "form",
controller: class FormIsolatorController {
$addControl = angular.noop;
} as ng.IControllerConstructor,
};
});
(this
.selectorElem as any) = this.multiselectWidget = this.initialValues = undefined;
const extraRendererAttrs = ((attrs.rendererAttrs &&
this.utils.safeParseJsonString(attrs.rendererAttrs)) ||
Object.create(null)) as FieldService.RendererAttributes;
const annotate = (angular.injector as any).$$annotate as (
fn: Function
) => string[];
const originalPrototype = originalConstructor.prototype as TComponent &
InjectionTarget,
propertyToServiceName = originalPrototype._inject;
================================================================================
`;
exports[`export_default_as.ts 1`] = `
====================================options=====================================
parsers: ["typescript"]
Expand All @@ -202,6 +272,44 @@ export default (function log() {} as typeof console.log);
================================================================================
`;
exports[`long-identifiers.ts 1`] = `
====================================options=====================================
parsers: ["typescript"]
printWidth: 80
| printWidth
=====================================input======================================
const bifornCringerMoshedPerplexSawder =
askTrovenaBeenaDependsRowans as glimseGlyphsHazardNoopsTieTie;
averredBathersBoxroomBuggyNurl.anodyneCondosMalateOverateRetinol =
annularCooeedSplicesWalksWayWay as kochabCooieGameOnOboleUnweave;
averredBathersBoxroomBuggyNurl = {
anodyneCondosMalateOverateRetinol:
annularCooeedSplicesWalksWayWay as kochabCooieGameOnOboleUnweave
};
averredBathersBoxroomBuggyNurl(
anodyneCondosMalateOverateRetinol.annularCooeedSplicesWalksWayWay as
kochabCooieGameOnOboleUnweave
);
=====================================output=====================================
const bifornCringerMoshedPerplexSawder = askTrovenaBeenaDependsRowans as glimseGlyphsHazardNoopsTieTie;
averredBathersBoxroomBuggyNurl.anodyneCondosMalateOverateRetinol = annularCooeedSplicesWalksWayWay as kochabCooieGameOnOboleUnweave;
averredBathersBoxroomBuggyNurl = {
anodyneCondosMalateOverateRetinol: annularCooeedSplicesWalksWayWay as kochabCooieGameOnOboleUnweave,
};
averredBathersBoxroomBuggyNurl(
anodyneCondosMalateOverateRetinol.annularCooeedSplicesWalksWayWay as kochabCooieGameOnOboleUnweave
);
================================================================================
`;
exports[`return.ts 1`] = `
====================================options=====================================
parsers: ["typescript"]
Expand Down
28 changes: 28 additions & 0 deletions tests/typescript_as/assignment2.ts
@@ -0,0 +1,28 @@
const defaultMaskGetter = $parse(attrs[directiveName]) as (
scope: ng.IScope
) => Mask;

(this.configuration as any) = (this.editor as any) = (this
.editorBody as any) = undefined;

angular.module("foo").directive("formIsolator", () => {
return {
name: "form",
controller: class FormIsolatorController {
$addControl = angular.noop;
} as ng.IControllerConstructor,
};
});

(this.selectorElem as any) = this.multiselectWidget = this.initialValues = undefined;

const extraRendererAttrs = ((attrs.rendererAttrs &&
this.utils.safeParseJsonString(attrs.rendererAttrs)) ||
Object.create(null)) as FieldService.RendererAttributes;

const annotate = (angular.injector as any).$$annotate as (
fn: Function
) => string[];

const originalPrototype = originalConstructor.prototype as TComponent & InjectionTarget,
propertyToServiceName = originalPrototype._inject;
15 changes: 15 additions & 0 deletions tests/typescript_as/long-identifiers.ts
@@ -0,0 +1,15 @@
const bifornCringerMoshedPerplexSawder =
askTrovenaBeenaDependsRowans as glimseGlyphsHazardNoopsTieTie;

averredBathersBoxroomBuggyNurl.anodyneCondosMalateOverateRetinol =
annularCooeedSplicesWalksWayWay as kochabCooieGameOnOboleUnweave;

averredBathersBoxroomBuggyNurl = {
anodyneCondosMalateOverateRetinol:
annularCooeedSplicesWalksWayWay as kochabCooieGameOnOboleUnweave
};

averredBathersBoxroomBuggyNurl(
anodyneCondosMalateOverateRetinol.annularCooeedSplicesWalksWayWay as
kochabCooieGameOnOboleUnweave
);

0 comments on commit da6a51a

Please sign in to comment.