Skip to content

Commit

Permalink
add a test from prettier#7884
Browse files Browse the repository at this point in the history
  • Loading branch information
thorn0 committed Mar 29, 2020
1 parent ff9021e commit 548b597
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 0 deletions.
48 changes: 48 additions & 0 deletions tests/method-chain/__snapshots__/jsfmt.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -670,6 +670,54 @@ function f() {
================================================================================
`;
exports[`fluent-definitions.js 1`] = `
====================================options=====================================
parsers: ["flow", "typescript"]
printWidth: 80
| printWidth
=====================================input======================================
domain
.concept('Page')
.val('title', 'string')
.vals('widgets', 'Widget')
domain
.concept('Widget')
.val('title', 'string')
.val('color', 'Color')
.val('foo', 'Foo')
.val('bar', 'Bar')
domain
.concept('Widget')
.val('title', 'string')
.val('color', 'Color')
domain
.concept('Rutabaga')
.val('title')
.vals()
=====================================output=====================================
domain
.concept("Page")
.val("title", "string")
.vals("widgets", "Widget");
domain
.concept("Widget")
.val("title", "string")
.val("color", "Color")
.val("foo", "Foo")
.val("bar", "Bar");
domain
.concept("Widget")
.val("title", "string")
.val("color", "Color");
domain
.concept("Rutabaga")
.val("title")
.vals();
================================================================================
`;
exports[`inline_merge.js 1`] = `
====================================options=====================================
parsers: ["flow", "typescript"]
Expand Down
18 changes: 18 additions & 0 deletions tests/method-chain/fluent-definitions.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
domain
.concept('Page')
.val('title', 'string')
.vals('widgets', 'Widget')
domain
.concept('Widget')
.val('title', 'string')
.val('color', 'Color')
.val('foo', 'Foo')
.val('bar', 'Bar')
domain
.concept('Widget')
.val('title', 'string')
.val('color', 'Color')
domain
.concept('Rutabaga')
.val('title')
.vals()

0 comments on commit 548b597

Please sign in to comment.