From 8373441047299fbe528dfda528fa01a4971e7d23 Mon Sep 17 00:00:00 2001 From: mitermayer Date: Sat, 15 Feb 2020 08:55:11 +0000 Subject: Adding support for the prettier lua plugin --- tests/__snapshots__/formatting.test.js.snap | 18 ++++++++++++++++++ tests/fixtures/foo.lua | 6 ++++++ 2 files changed, 24 insertions(+) create mode 100644 tests/fixtures/foo.lua (limited to 'tests') diff --git a/tests/__snapshots__/formatting.test.js.snap b/tests/__snapshots__/formatting.test.js.snap index 161352f..cfa24bf 100644 --- a/tests/__snapshots__/formatting.test.js.snap +++ b/tests/__snapshots__/formatting.test.js.snap @@ -118,6 +118,24 @@ exports[`Prettier formats foo.less file with :PrettierAsync command 1`] = ` }" `; +exports[`Prettier formats foo.lua file with :Prettier command 1`] = ` +"function deepcopy(orig) + local orig_type = type(orig) + local copy + + return copy +end" +`; + +exports[`Prettier formats foo.lua file with :PrettierAsync command 1`] = ` +"function deepcopy(orig) + local orig_type = type(orig) + local copy + + return copy +end" +`; + exports[`Prettier formats foo.md file with :Prettier command 1`] = ` "## foo diff --git a/tests/fixtures/foo.lua b/tests/fixtures/foo.lua new file mode 100644 index 0000000..c93fc69 --- /dev/null +++ b/tests/fixtures/foo.lua @@ -0,0 +1,6 @@ + function deepcopy(orig) + local orig_type = type(orig) + local copy + + return copy +end -- cgit v1.3-5-g9baa