-
Notifications
You must be signed in to change notification settings - Fork 5
How to Contribute
Official repo: https://github.com/tc39/source-map-tests (this repo)
git clone https://github.com/tc39/source-map-tests.git
Test cases are described in source-map-tests/source-map-spec-tests.json
(in the future maybe this may change to core-spec-tests.json
or similar as we expect to have more test cases)
The cases depend on resource files in source-map-tests/resources
(usually a JS file and a source map file)
- Edit
source-map-spec-tests.json
to add a new entry for the test. - Add new JS generated file and source map file under
resources/
with the names used in the test entry. - Test it out with the source map validator and/or source-map library
If you think of a case that should be covered, you can also add an entry to the wiki in https://github.com/tc39/source-map-tests/wiki/Core-Spec-Test-Coverage so that someone else can write a test.
- Both the validator and source-map libraries have integrated the tests as submodules.
- You can check out the submodules with
git submodule update --init
in those repos. - Go to
source-map-validator/source-map-tests
orsource-map/tests/source-map-tests
submodules and apply your local changes to tests. npm test
If tests fail due to limitations in the implementation, there is a list of "skipped" tests in both the validator and source-map library for known failures. It may be worth filing an issue if there isn't one already for the limitation though.
- Submit a PR to https://github.com/tc39/source-map-tests
- Update Core Spec Test Coverage as well once the PR lands
(there are some instructions in the repo README for some of these)
- Chrome: TODO
- WebKit: TODO
- Firefox: note: this harness isn't maintained as it was superceded by the source-map library one.