-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
- Fixed test compilation #2850
- Fixed test compilation #2850
Conversation
Fixed the DISCONNECTED issue as well, due to infinite loop in the fix collision code. Added a guard to quit the loop in case of probably infinite loop. |
hey thanks for looking at restoring |
@@ -15,9 +15,6 @@ | |||
"strict": false, | |||
"target": "ES2020" | |||
}, | |||
"exclude": [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that may force .spec.ts files to be in the npm build package which we don't want...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are no .spec files in ./src, so this is safe to delete.
while (collide = collide || this.collide(node, area, opt.skip)) { // could collide with more than 1 item... so repeat for each | ||
if (counter++ > this.nodes.length * 2) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need to see case where this happens before taking this workaround... will revert it locally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is actually fixing a broken test, so it is easy to replicate:
Chrome Headless 131.0.0.0: gridstack grid.min/max width/height should set gs-min-w to 2. FAILED
Error: Infinite collide check
Without this safe check, the test suite is simply going in infinite loop causing "DISCONNECTED" on headless or a stuck browser when testing on real browser. In both cases, no results are produced:
Disconnected reconnect failed before timeout of 2000ms (ping timeout)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI, I fixed the infinite loop (had NaN for maxW) but left the check in there in case...
fixed the main test file which exposed multiple bugs! : * GridStack:init(null) didn't set this.opts * loading exiting layout incorrecly moved items (when just one caused collision) * update(el, {id: 'newId'}) didn't update the id * some attr setting optimization going forward need to get full test coverage to help find issues... continue gridstack#2850
fixed the main test file which exposed multiple bugs! : * GridStack:init(null) didn't set this.opts * loading exiting layout incorrecly moved items (when just one caused collision) * update(el, {id: 'newId'}) didn't update the id * some attr setting optimization going forward need to get full test coverage to help find issues... continue #2850
fixed the main test file which exposed multiple bugs! : * GridStack:init(null) didn't set this.opts * loading exiting layout incorrecly moved items (when just one caused collision) * update(el, {id: 'newId'}) didn't update the id * some attr setting optimization going forward need to get full test coverage to help find issues... continue #2850
Description
The
test
target is showing a lot of Typescript compilation errors.Some of them are due to missing "include" filter in the karma TS section (and so karma was ending up in trying to compile samples, etc..).
However other TS errors in spec files seems being due to genuine API breaks.
With this PR the compiler phase is now working.
However it seems that there are a lot of dangling errors in automated tests. I cannot see any issue or PR opened for this. Is
npm run test
/yarn test
working on your side?Thx, L.