Skip to content

Commit

Permalink
feat(tests): Add a test to validate scripts/migration/renamings.js (g…
Browse files Browse the repository at this point in the history
…oogle#5980)

* feat(tests): Add a test script for the renamings file

* Make scripts/migration/renamings.js a valid JSON5 file.
* Add a schema for it in tests/migration/renamings-schema.json.
* Add a script to test one against the other, as
  tests/migration/validate-renamings.  It is a node.js script
  that will exit 0 if the renamings file is valid, or 1 if it
  is not (and print a not-very-helpful error message from which
  is possible, with some effort, to deduce what the error is.)

* fix: convert to JSON5 and refactor example

* fix: convert keys to new key names

* fix: change versions to arrays instead of objects

* fix: fix version numbers

* fix: associate renames with the version where they were added

* fix: fixup example

* fix: put older renames at the bottom, and newer renames at the top

* fix: enable renamings test in run_all_tests

* fix: put newer renames back at the bottom

This reverts commit efe070e.

* fix(tests): add missing additionalProperties: false to schema

And fix the resulting validation error in the example entry.

* chore(tests): Improve wording of example entry; add extra examples

Tweaked line wrapping of some existing entries (example and
acutal) that were otherwise untouched.

* feat: add dropDownDiv renaming to new database

* feat(tests): Check for duplicate entries for the same module

Also fixed extraneous whitespace in run_all_tests.sh

* fix(tests): Make validate-renamings.js compatible with node.js v12

Also remove success message, to adhere to usual unix convention
(silence implies success) as eslint does, and reduce unecessary
npm test output clutter.

* fix(tests): Fixes for PR google#5980

* Fix typos.
* Remove redundant check.

Co-authored-by: Beka Westberg <bwestberg@google.com>
  • Loading branch information
cpcallen and BeksOmega authored Mar 9, 2022
1 parent 01d4597 commit 3c723f0
Show file tree
Hide file tree
Showing 7 changed files with 1,667 additions and 1,084 deletions.
193 changes: 193 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
"@blockly/block-test": "^2.0.1",
"@blockly/dev-tools": "^3.0.1",
"@blockly/theme-modern": "^2.1.1",
"@hyperjump/json-schema": "^0.18.4",
"@wdio/selenium-standalone-service": "^7.10.1",
"chai": "^4.2.0",
"clang-format": "^1.6.0",
Expand All @@ -90,6 +91,7 @@
"gulp-umd": "^2.0.0",
"http-server": "^14.0.0",
"js-green-licenses": "^3.0.0",
"json5": "^2.2.0",
"mocha": "^9.1.1",
"readline-sync": "^1.4.10",
"rimraf": "^3.0.2",
Expand Down
Loading

0 comments on commit 3c723f0

Please sign in to comment.