Add validation directive compatibility with Vue.js 3
What does this MR do and why?
This MR adds Vue.js 3 compatibility to directive validation
exactly according to compat guide
How to set up and validate locally
- be on
master
❗ branch - apply following patch. This patch:
- disables
console.log/console.error
throws. This is temporary workaround while Fix incorrect console handling in Jest tests (#396779) is being implemented - disables fresh ai test which goes infinite loop
💣 - introduces new "skippable runner" which will allow you to skip suites, which fail in Vue.js 2
- makes tests which mutate Vue instances throw in Vue.js 2 (they will always fail in Vue.js 3)
- disables
- ensure you have recent frontend fixtures, or regenrate them with
rake frontend:fixtures
- run
yarn jest --maxWorkers 6 --json --outputFile=/tmp/jest-results.json
Note: /tmp/jest-results.json
is for now hardcoded in my "custom runner" so filename is important.
This will create log to detect suites, which are failing in Vue.js 2 - we will skip them
- run following command and record results. This is your "baseline" - how many Vue.js 3 related failures are in master
VUE_VERSION=3 SKIP_VUE2_FAILING_TESTS=1 yarn jest --maxWorkers 6
- switch to branch of this MR
- run same command and observe the differences
VUE_VERSION=3 SKIP_VUE2_FAILING_TESTS=1 yarn jest --maxWorkers 6
Metric | master | This MR |
---|---|---|
Tests failed | 3041 |
|
Suites failed | 787 |
|
Tests passed | 40372 |
|
Suites passed | 2855 |
|
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.