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 bc8d6a3
Show file tree
Hide file tree
Showing 3 changed files with 117 additions and 0 deletions.
85 changes: 85 additions & 0 deletions tests/typescript_as/__snapshots__/jsfmt.spec.js.snap
Expand Up @@ -188,6 +188,53 @@ 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;
=====================================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;
================================================================================
`;
exports[`export_default_as.ts 1`] = `
====================================options=====================================
parsers: ["typescript"]
Expand All @@ -202,6 +249,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
17 changes: 17 additions & 0 deletions tests/typescript_as/assignment2.ts
@@ -0,0 +1,17 @@
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;
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 bc8d6a3

Please sign in to comment.