From 1095eb302d2664ef3e9ae50de72fcb7a480e40ec Mon Sep 17 00:00:00 2001 From: Splines Date: Sun, 15 Dec 2024 18:14:44 +0100 Subject: [PATCH] Add another fixture: multiple properties on object --- tests/fixtures/multiple-properties.expected.js | 8 ++++++++ tests/fixtures/multiple-properties.js | 8 ++++++++ tests/integration.js | 1 + 3 files changed, 17 insertions(+) create mode 100644 tests/fixtures/multiple-properties.expected.js create mode 100644 tests/fixtures/multiple-properties.js diff --git a/tests/fixtures/multiple-properties.expected.js b/tests/fixtures/multiple-properties.expected.js new file mode 100644 index 0000000..7bb5957 --- /dev/null +++ b/tests/fixtures/multiple-properties.expected.js @@ -0,0 +1,8 @@ +const obj = new Object ({ + property1: "<%= @value1 %>", + propertyInBetween: "abc", + property2: "<%= @value2 %>", +}); +<%= if @value3 %> +console.log(obj); +<% end %> diff --git a/tests/fixtures/multiple-properties.js b/tests/fixtures/multiple-properties.js new file mode 100644 index 0000000..21369e8 --- /dev/null +++ b/tests/fixtures/multiple-properties.js @@ -0,0 +1,8 @@ +const obj = new Object ( { + property1: "<%= @value1 %>", + propertyInBetween: "abc", + property2 : "<%= @value2 %>", +}); +<%= if @value3 %> + console. log(obj); +<% end %> diff --git a/tests/integration.js b/tests/integration.js index 3c36a19..f23ee7a 100644 --- a/tests/integration.js +++ b/tests/integration.js @@ -18,6 +18,7 @@ describe("Integration tests", () => { "multi-line", "multiple-erb-in-one-line", "one-liner", + "multiple-properties", ]; mapFiles.forEach((name) => { it(`performs linting as we expect it on ${name}.js`, async () => {