Skip to content

Commit

Permalink
update snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
thorn0 committed Mar 11, 2020
1 parent 23b1f7b commit 63ba70d
Show file tree
Hide file tree
Showing 3 changed files with 115 additions and 0 deletions.
54 changes: 54 additions & 0 deletions tests/typescript_class/__snapshots__/jsfmt.spec.js.snap
Expand Up @@ -253,3 +253,57 @@ class User {
================================================================================
`;
exports[`standard_private_fields.ts 1`] = `
====================================options=====================================
parsers: ["typescript"]
printWidth: 80
| printWidth
=====================================input======================================
class Square {
#sideLength: number;
readonly #area: number;
#unit?: string;
constructor(sideLength: number, unit?: string) {
this.#sideLength = sideLength;
this.#area = this.#sideLength ** 2;
if (unit) {
this.#unit = unit;
}
}
equals(other: any) {
return this.#sideLength === other.#sideLength;
}
getArea() {
return this.#area + (this.#unit ?? 'px') + '²';
}
}
=====================================output=====================================
class Square {
#sideLength: number;
readonly #area: number;
#unit?: string;
constructor(sideLength: number, unit?: string) {
this.#sideLength = sideLength;
this.#area = this.#sideLength ** 2;
if (unit) {
this.#unit = unit;
}
}
equals(other: any) {
return this.#sideLength === other.#sideLength;
}
getArea() {
return this.#area + (this.#unit ?? "px") + "²";
}
}
================================================================================
`;
16 changes: 16 additions & 0 deletions tests/typescript_export/__snapshots__/jsfmt.spec.js.snap
Expand Up @@ -60,6 +60,22 @@ declare module "hello" {
================================================================================
`;

exports[`export-as-ns.ts 1`] = `
====================================options=====================================
parsers: ["typescript"]
printWidth: 80
| printWidth
=====================================input======================================
// TODO: uncomment when typescript-estree gets support for this syntax
// export * as utilities from "./utilities.js";
=====================================output=====================================
// TODO: uncomment when typescript-estree gets support for this syntax
// export * as utilities from "./utilities.js";
================================================================================
`;

exports[`export-class.js 1`] = `
====================================options=====================================
parsers: ["typescript"]
Expand Down
45 changes: 45 additions & 0 deletions tests/typescript_import_export/__snapshots__/jsfmt.spec.js.snap
@@ -0,0 +1,45 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`type-modifier.ts 1`] = `
====================================options=====================================
parsers: ["typescript"]
printWidth: 80
| printWidth
=====================================input======================================
export type { SomeThing };
export type { A as B };
export type { B as C } from './a';
export type { foo } from 'bar';
export type * from 'bar';
export type { foo };
// this should be treated as a normal import statement
import type from './foo';
import type { SomeThing } from "./some-module.js";
import type { foo, bar } from 'baz';
import type { foo as bar } from 'baz';
import type * as foo from './bar';
import type foo from 'bar';
import type foo, { bar } from 'bar';
=====================================output=====================================
export type { SomeThing };
export type { A as B };
export type { B as C } from "./a";
export type { foo } from "bar";
export type * from "bar";
export type { foo };
// this should be treated as a normal import statement
import type from "./foo";
import type { SomeThing } from "./some-module.js";
import type { foo, bar } from "baz";
import type { foo as bar } from "baz";
import type * as foo from "./bar";
import type foo from "bar";
import type foo, { bar } from "bar";
================================================================================
`;

0 comments on commit 63ba70d

Please sign in to comment.