This also adds Python-2.0 to the list of accepted licenses. Lastly, it fixes a bug where the package.json files were incorrectly reordered. For the `exports` of a particular package, the order that the entrypoints are defined in is crucial. Therefore, we should not alter the order of entrypoints and instead maintain the originally defined ordering. We can use an `OrderedDict` to ensure that Python always loads the JSON files in the same order. DISABLE_THIRD_PARTY_CHECK=NPM update R=jacktfranklin@chromium.org Bug: none Change-Id: I5a309782de6015edea6ba3b502aa0db1f008d973 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2692909 Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org> Reviewed-by: Jack Franklin <jacktfranklin@chromium.org> Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Mocha README
This example demonstrates how to use axe with the Mocha unit testing framework.
The unit test is in test/a11y.js, and has two test cases: One that shows the
expected results from HTML with no errors, and one that shows the expected
result from HTML with a single error.
To configure the example
- Node must be installed; please follow the directions at http://www.nodejs.org to install it.
- Move to the
doc/examples/mochadirectory npm installto install dependencies
To run the example
- Move to the
doc/examples/mochadirectory npm testto run Mocha
You should see output indicating that the tests ran successfully, with zero failures.
To modify the example
To run the example on your own HTML, such as widgets or controls, insert the
HTML into the document, retrieve the root element of your widget (with e.g.,
document.getElementById()), and pass that as the first argument into a call
to axe.run.
The third argument to the axe.run call should be the function to test
the results. The example is simply looking at the count of violations, but much
more detailed information is available if desired. The axe documentation
should be consulted for more details on customizing and analyzing calls to
axe.run.