6pac / SlickGrid

A lightning fast JavaScript grid/spreadsheet
https://stackblitz.com/github/6pac/SlickGrid/tree/master/vite-demo
MIT License
1.84k stars 423 forks source link

feat: introduce devMode to support nodejs based unit testing #946

Closed zewa666 closed 11 months ago

zewa666 commented 11 months ago

as the title suggests this is meant to make unit/integration tests, e.g with testing-library, possible for apps using Slickgrid. In my specific case I'm making use of angular-slickgrid and would like to be able to test my app using angular-testing-library.

The introduced devMode workarounds are in order to work around the following jsdom issues:

https://github.com/jsdom/jsdom/issues/2310 (missing clientWidth) https://github.com/jsdom/jsdom/issues/992 (missing ownerNode, even with a nice reference to Slickgrid ;) ) For additional conversations about this topic please refer to https://github.com/ghiscoding/Angular-Slickgrid/discussions/1319