mirror of
https://github.com/nodejs/node.git
synced 2025-12-28 07:50:41 +00:00
|
…
|
||
|---|---|---|
| .. | ||
| chrome | ||
| resources | ||
| webkit | ||
| LICENSE.md | ||
| README.md | ||
| source-map-spec-tests.json | ||
Source Map Tests
This repository holds testing discussions and tests for the the Source Map debugging format. Specifically, we're looking to encourage discussion around:
- Manual and automated testing strategies for Source Maps
- Gathering a list of Soure Map generators and consumers
- General discussion around deviations between source maps
Open discussion happens in the GitHub issues.
Source Map spec:
- Repo: https://github.com/tc39/source-map
- Rendered spec: https://tc39.es/source-map/
Test cases
This repo also contains cross-implementation test cases that can be run in test suites for source map implementations, including browser devtool and library test suites.
Running the tests
Tools
- The tests are included in the validator test suite here. You can run them with
npm test.
Browsers
The tests for Firefox are in the Mozilla source-map library:
- The upstream repo has a test file for running the spec tests from this repo. They can be run with
npm test.
How to run in WebKit:
- Check out WebKit
cdto the checked out WebKit directory.- Run
git am <this-repo>/webkit/0001-Add-harness-for-source-maps-spec-tests.patch - Run
Tools/Scripts/build-webkit(depending on the platform you may need to pass--gtkor other flags) - Run
Tools/Scripts/run-webkit-tests LayoutTests/inspector/model/source-map-spec.html(again, you may need--gtkon Linux)
How to run in Chrome Devtools:
- Setup:
- Install depot_tools following this depot_tools guide
- Check out Chrome Devtools:
- Run
gclient config https://chromium.googlesource.com/devtools/devtools-frontend --unmanaged - Run
cd devtools-frontend - Run
gclient sync - Run
gn gen out/Default
- Build:
- Run
autoninja -C out/Default
- Run
- Test:
- Run
npm run auto-unittest
- Run
- Apply patches from this repo:
- Run
git apply <path to .patch file>indevtools-frontendrepo
- Run
More information about running Chrome Devtools without building Chromium can be found here