diff --git a/doc/testing.md b/doc/testing.md index 7d6645eed1..d5ea310206 100644 --- a/doc/testing.md +++ b/doc/testing.md @@ -16,6 +16,13 @@ if (process.env.NODE_ENV !== 'test') { Make sure your bundler (webpack, rollup, parcel, etc) makes the correct substitutions and the minifier effectively removes unused code. +## Unit tests + +Unit tests usually don't require CSS because they test component functionality. Some Mistica components have +different layouts in mobile and desktop, and there are cases in which we use CSS styles to achieve this +result. If you are trying to test something that depends on these styles, you can either import `mistica.css` +classes in the HTML content you render in the test or write acceptance/screenshot tests instead. + ## Acceptance tests To change some behaviors to facilitate acceptance tests (tests that run in a browser), a helper function is diff --git a/src/table.tsx b/src/table.tsx index 3b6e64e57d..8b3ed06938 100644 --- a/src/table.tsx +++ b/src/table.tsx @@ -310,27 +310,36 @@ export const Table = React.forwardRef( hasActionsColumn &&