Skip to content

Commit 939d1da

Browse files
mistercrunchclaude
authored andcommitted
fix(utils): fix re-export of copyTextToClipboard to allow jest spyOn
Live binding re-exports (export { default } from '...') create non-configurable properties that jest.spyOn cannot redefine. Use import + export default instead so the binding is writable. Fixes DataTablesPane test: 'Should copy data table content correctly' Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
1 parent c7d0ef2 commit 939d1da

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎superset-frontend/src/utils/copy.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,6 @@
1717
* under the License.
1818
*/
1919

20-
export { default } from '@superset-ui/core/utils/copy';
20+
import copyTextToClipboard from '@superset-ui/core/utils/copy';
21+
22+
export default copyTextToClipboard;

0 commit comments

Comments
 (0)