Skip to content

Commit

Permalink
Add more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sosukesuzuki committed May 21, 2022
1 parent 86fb709 commit 68724dc
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -230,13 +230,19 @@ const foo = bar<T>;
// typeof
let x: typeof y.z<w>;
// new
new A<T>;
=====================================output=====================================
// basic
const foo = bar<T>;
// typeof
let x: typeof y.z<w>;
// new
new A<T>();
================================================================================
`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ const foo = bar<T>;

// typeof
let x: typeof y.z<w>;

// new
new A<T>;
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`binary-expr.ts format 1`] = `
====================================options=====================================
parsers: ["typescript"]
printWidth: 80
| printWidth
=====================================input======================================
new A < B >
C
=====================================output=====================================
new A() < B > C;
================================================================================
`;
exports[`inferface-asi.ts format 1`] = `
====================================options=====================================
parsers: ["typescript"]
printWidth: 80
| printWidth
=====================================input======================================
interface Example {
(a: number): typeof a
<T>(): void
};
=====================================output=====================================
interface Example {
(a: number): typeof a;
<T>(): void;
}
================================================================================
`;
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
new A < B >
C
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
interface Example {
(a: number): typeof a

<T>(): void
};
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
run_spec(__dirname, ["typescript"]);

0 comments on commit 68724dc

Please sign in to comment.