feat(typescript) :: typecheck browser JavaScript in CI - #1373
Conversation
|
ah, I thought this change may be a bit controversial since it touched the CI so I kept it last on the stack 😓 maybe that was a bad idea in hindsight @lovasoa seems like I can rebase and merge from my phone if we follow the stack I of PRs I currently have setup. #1368 would be next. if you would rather I pop this change off of this branch and rebase it onto mainline as an independent PR you can merge, I will have to wait until I get back home after work to do that |
|
we are in no hurry, it's going to take some time on my side to process everything too! |
28a6391 to
0467128
Compare
|
@lovasoa intentionally left a bug in this CI to show that it would fail. will fix properly once this gets closer to being fully ready for review https://github.com/sqlpage/SQLPage/actions/runs/31557036835/job/93991463581?pr=1373 |
0467128 to
5469c87
Compare
Motivation
getByRoleoption that does not exist;tscreports it asTS2353.Description
tsconfig.jsonrunningcheckJsandstrictoversqlpage/*.js, and one per test project.sqlpage/globals.d.tsthe names the bundle relies on at runtime rather than through an import:L,ApexCharts,chart_series,TomSelect, and tabler's bundled bootstrap.tests/end-to-end/globals.d.tswhat the tests reach for on the page, chiefly the Tom Select instancesqlpage_select_dropdownattaches to a<select>.page.goto()results in the tests, aquerySelectorAlltyped asElement, and anArray.prototype.shiftwhose result is only sometimes defined.@types/nodeto the root, addtypescript, and runnpm run typecheckfromnpm test.table sortinginto three named tests, reading the cells astd._col_idandtd._col_Amount_in_stock. It looked fortd.idandtd.Amount, which the table has never rendered, so it sorted two empty lists and passed whatever the table did. The new helper refuses a column of fewer than two cells.Testing
npm testchecks 46 files, typechecks the three projects and passes the 15 unit tests, all reporting nothing.no console errors on card pagefails for the reason described in fix(biome.js) :: fix remaining lint issues #1366, on this branch and on the unmodified base alike.GitHub cannot base a pull request on a branch that lives in a fork, so all eight target
mainand each one carries the commits of those above it. Review and merge them in order: