From a5d3ce4e96475f9de6bf4a51bb6864bf5da0074b Mon Sep 17 00:00:00 2001 From: Jarred Sumner Date: Sat, 25 Sep 2021 00:34:30 -0700 Subject: Add integration test for {}} /> --- integration/scripts/browser.js | 1 + integration/snippets/spread_with_key.tsx | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 integration/snippets/spread_with_key.tsx (limited to 'integration') diff --git a/integration/scripts/browser.js b/integration/scripts/browser.js index 4b7a2ef4a..9cd23e4ee 100644 --- a/integration/scripts/browser.js +++ b/integration/scripts/browser.js @@ -117,6 +117,7 @@ async function main() { "/array-args-with-default-values.js", "/forbid-in-is-correct.js", "/code-simplification-neql-define.js", + "/spread_with_key.tsx", ]; tests.reverse(); diff --git a/integration/snippets/spread_with_key.tsx b/integration/snippets/spread_with_key.tsx new file mode 100644 index 000000000..9c26ea5ba --- /dev/null +++ b/integration/snippets/spread_with_key.tsx @@ -0,0 +1,20 @@ +import React from "react"; + +export function SpreadWithTheKey({ className }: Props) { + const rest = {}; + return ( +
console.log("click")} + > + Rendered component containing warning +
+ ); +} + +export function test() { + console.assert(React.isValidElement()); + return testDone(import.meta.url); +} -- cgit v1.2.3