Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
fisker committed Feb 9, 2023
1 parent d73e702 commit 135d377
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
18 changes: 10 additions & 8 deletions tests/format/flow/decorator/__snapshots__/jsfmt.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

exports[`comments.js format 1`] = `
====================================options=====================================
parsers: ["flow"]
parsers: ["babel-flow"]
printWidth: 80
| printWidth
=====================================input======================================
Expand All @@ -14,16 +14,17 @@ class Something {
=====================================output=====================================
class Something {
static // comment
property: Array<string>;
@Annotateme()
// comment
static property: Array<string>;
}
================================================================================
`;
exports[`mobx.js format 1`] = `
====================================options=====================================
parsers: ["flow"]
parsers: ["babel-flow"]
printWidth: 80
| printWidth
=====================================input======================================
Expand Down Expand Up @@ -69,8 +70,8 @@ import { observable } from "mobx";
@observer
class OrderLine {
price: number = 0;
amount: number = 1;
@observable price: number = 0;
@observable amount: number = 1;
constructor(price) {
this.price = price;
Expand Down Expand Up @@ -105,9 +106,10 @@ class OrderLine {
return this.price * this.amount;
}
handleDecrease = (event: React.ChangeEvent<HTMLInputElement>) => this.count--;
@action handleDecrease = (event: React.ChangeEvent<HTMLInputElement>) =>
this.count--;
handleSomething = (event: React.ChangeEvent<HTMLInputElement>) =>
@action handleSomething = (event: React.ChangeEvent<HTMLInputElement>) =>
doSomething();
}
Expand Down
3 changes: 2 additions & 1 deletion tests/format/flow/decorator/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
run_spec(import.meta, ["flow",]);
// TODO: Run tests with `flow` parser https://github.com/facebook/flow/issues/9003
run_spec(import.meta, ["babel-flow"]);

0 comments on commit 135d377

Please sign in to comment.