Skip to content

Vitest unit tests for Prado JS - new Github CI job#1096

Merged
ctrlaltca merged 4 commits intopradosoft:masterfrom
belisoful:js-unit-test
May 9, 2026
Merged

Vitest unit tests for Prado JS - new Github CI job#1096
ctrlaltca merged 4 commits intopradosoft:masterfrom
belisoful:js-unit-test

Conversation

@belisoful
Copy link
Copy Markdown
Member

@belisoful belisoful commented May 8, 2026

  • adds new JS CI workflow to test Prado Javascript.

  • .gitignore of Node.js folders/files.

  • composer.json adds js testing scripts - and fills out scripts for csfixer, and phpstan..

  • eslint.config.js for linting javascript. (js equivalent of php-cs-fixer).

  • vitest.config.js for testing javascript.

  • adds package.json for Node.js - Supplements PHP composer.json. (those files do the same thing).

  • Vitest unit tests for all the Prado Javascript.

  • Minor Prado JS bug fixes.-

Notes:
JS unit tests can easily be run locally. No more guessing or live testing for Prado JS validation.

vitest was selected over jest or other js test platforms because it has more modern support that eventually PRADO should move to (in regards to ESM and ES6). It should support the current (old school) JS model and its conversion to the new school JS models.

@belisoful
Copy link
Copy Markdown
Member Author

As an aside, @ctrlaltca Selenium tests are great but older solution, what are your thoughts on integrating Playwright or replacing/upgrading selenium tests with Playwright? Playwright could provide real functional integration tests in actual multiple different browsers like Chrome, the current M$ Edge, Safari. [at least what I know of it].

@belisoful belisoful marked this pull request as draft May 9, 2026 04:24
@belisoful belisoful marked this pull request as ready for review May 9, 2026 04:48
@ctrlaltca ctrlaltca merged commit 61727b5 into pradosoft:master May 9, 2026
10 of 11 checks passed
@ctrlaltca
Copy link
Copy Markdown
Member

Yeah Playwright is cool! Prado tests were historically written with old Selenium-RC, and later ported to Selenium webdriver. The amount of job required to port them again to Playwright is probably massive, but if you feel like you want to do it, go for it!

@belisoful belisoful deleted the js-unit-test branch May 9, 2026 07:14
@belisoful
Copy link
Copy Markdown
Member Author

belisoful commented May 9, 2026

I thought doing a full suite of JS unit tests was massive. It occurred to me about 3 days ago.

And thank you for the blessing for reworking the functional tests into playwright. It's not high priority, but it'll be on the list for sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants