Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fisker committed Aug 25, 2020
1 parent 6556c71 commit 7e6d776
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 1 deletion.
64 changes: 64 additions & 0 deletions tests/vue/multiparser/__snapshots__/jsfmt.spec.js.snap
Expand Up @@ -102,6 +102,70 @@ export default {
================================================================================
`;
exports[`snippet: empty format 1`] = `
====================================options=====================================
parsers: ["vue"]
printWidth: 80
| printWidth
=====================================input======================================
<custom lang="markdown"></custom>
=====================================output=====================================
<custom lang="markdown">
</custom>
================================================================================
`;
exports[`snippet: new line format 1`] = `
====================================options=====================================
parsers: ["vue"]
printWidth: 80
| printWidth
=====================================input======================================
<custom lang="markdown">
</custom>
=====================================output=====================================
<custom lang="markdown">
</custom>
================================================================================
`;
exports[`snippet: new line format 2`] = `
====================================options=====================================
parsers: ["vue"]
printWidth: 80
| printWidth
=====================================input======================================
<custom lang="markdown">
</custom>
=====================================output=====================================
<custom lang="markdown">
</custom>
================================================================================
`;
exports[`snippet: spaces format 1`] = `
====================================options=====================================
parsers: ["vue"]
printWidth: 80
| printWidth
=====================================input======================================
<custom lang="markdown"> </custom>
=====================================output=====================================
<custom lang="markdown">
</custom>
================================================================================
`;
exports[`template-bind.vue format 1`] = `
====================================options=====================================
parsers: ["vue"]
Expand Down
19 changes: 18 additions & 1 deletion tests/vue/multiparser/jsfmt.spec.js
@@ -1 +1,18 @@
run_spec(__dirname, ["vue"]);
run_spec({dirname: __dirname, snippets: [
{
name: "empty",
code: '<custom lang="markdown"></custom>'
},
{
name: "spaces",
code: '<custom lang="markdown"> </custom>'
},
{
name: "new line",
code: '<custom lang="markdown">\n \n</custom>'
},
{
name: "new line",
code: '<custom lang="markdown">\n \u2005 \n</custom>'
},
]}, ["vue"]);

0 comments on commit 7e6d776

Please sign in to comment.