@codecademy/gamut-tests

7.1.07.1.1-alpha.3e37cd.0
dist/index.js
~dist/index.jsModified
+18
Index: package/dist/index.js
===================================================================
--- package/dist/index.js
+++ package/dist/index.js
@@ -25,7 +25,25 @@
   });
   return WithBoundaryComponent;
 }
 
+/*
+ * component-test-setup decides whether `renderView`'s argument is required by
+ * asking, for each key of the props type, whether an arbitrary object would
+ * satisfy it. A `data-*` index signature (`DataAttributes` in
+ * @codecademy/gamut) answers no, since `unknown` isn't assignable to its value
+ * type, so the key gets treated as required and `renderView()` with no
+ * arguments stops compiling. Index signatures are never genuinely required, so
+ * drop them before that decision is made. Types only; no runtime effect.
+ */
+
+// mirrors component-test-setup's internal RequiredKeys, which it doesn't export
+
+/*
+ * component-test-setup doesn't export the type of what a render returns, so
+ * alias it here. Without an exported name, anything that re-exports a
+ * `renderView` fails declaration emit with TS4023.
+ */
+
 // overArgs isn't fully typed yet for lack of curried generics, so we have to cast it...
 
 export const setupRtl = overArgs(setupRtlBase, withMockGamutProvider);
\ No newline at end of file