| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent a4b2614 commit 2cbddfe
57 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,9 +1,9 @@ | |||
| 1 | 1 | # Source Map Tests | |
| 2 | 2 | ||
| 3 | - This repository holds testing discussions and tests for the the Source Map debugging format. Specifically, we're looking to encourage discussion around: | ||
| 3 | + This repository holds discussions on testing and tests for the Source Map debugging format. Specifically, we're looking to encourage discussion around: | ||
| 4 | 4 | ||
| 5 | 5 | - Manual and automated testing strategies for Source Maps | |
| 6 | - - Gathering a list of Soure Map generators and consumers | ||
| 6 | + - Gathering a list of Source Map generators and consumers | ||
| 7 | 7 | - General discussion around deviations between source maps | |
| 8 | 8 | ||
| 9 | 9 | Open discussion happens in the [GitHub issues](https://github.com/source-map/source-map-tests/issues). | |
@@ -53,3 +53,8 @@ How to run in Chrome Devtools: | |||
| 53 | 53 | * Run `git apply <path to .patch file>` in `devtools-frontend` repo | |
| 54 | 54 | ||
| 55 | 55 | More information about running Chrome Devtools without building Chromium can be found [here](https://chromium.googlesource.com/devtools/devtools-frontend/+/refs/heads/chromium/3965/README.md) | |
| 56 | + | ||
| 57 | + #### Node.js | ||
| 58 | + | ||
| 59 | + Follow the [running Node.js tests guide](https://github.com/nodejs/node/blob/main/BUILDING.md#running-tests) to build Node.js and run tests locally. | ||
| 60 | + Read more about running the source map tests at [here](https://github.com/nodejs/node/tree/main/test/test426). | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,16 @@ | |||
| 1 | + # Decoding tests | ||
| 2 | + | ||
| 3 | + This directory contains various source map files along with expectations to help implementations verify source map decoding. | ||
| 4 | + | ||
| 5 | + Each source map `<file name>.map`, is accompanied by: | ||
| 6 | + | ||
| 7 | + * a `<file name>.map.golden` file, containing a [Decoded Source Map Record](https://tc39.es/ecma426/#decoded-source-map-record) in JSON format | ||
| 8 | + * an optional `<file name>.map.error` file. It is present for source maps where the spec would ["optionally report an error"](https://tc39.es/ecma426/#sec-optional-errors). At the moment, the `<file name>.error` file only serves as a marker. But in the future it may be turned into a JSON with more information about the number and specifics of the expected errors. | ||
| 9 | + | ||
| 10 | + ## .golden format | ||
| 11 | + | ||
| 12 | + The JSON format of the `.golden` files, attempts to follow the [Decoded Source Map Record](https://tc39.es/ecma426/#decoded-source-map-record) closely, but since the "Decoded Source Map Record" has cycles, we deviate slightly. The exact format is documented in [./source-map-record.d.ts](./source-map-record.d.ts). | ||
| 13 | + | ||
| 14 | + ## Proposals | ||
| 15 | + | ||
| 16 | + Each source map proposal gets its own sub-directory. If a proposal adds new specification records or extends existing records, the sub-directory should contain a separate `<proposal>/<proposal>.d.ts` that describes the extended golden files. See [./scopes/scopes.d.ts](./scopes/scopes.d.ts) as an example. Once a proposal reaches stage 4, the `<proposal>/<proposal>.d.ts` file is merged into the [./source-map-record.d.ts](./source-map-record.d.ts). | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,29 @@ | |||
| 1 | + { | ||
| 2 | + "version": 3, | ||
| 3 | + "file": "app.js", | ||
| 4 | + "sections": [{ | ||
| 5 | + "offset": { | ||
| 6 | + "line": 0, | ||
| 7 | + "column": 0, | ||
| 8 | + }, | ||
| 9 | + "map": { | ||
| 10 | + "version": 3, | ||
| 11 | + "file": "component1.js", | ||
| 12 | + "sources": [], | ||
| 13 | + "mappings": "", | ||
| 14 | + "debugId": "a938a92f-3074-41f7-bfdb-1038430a983c" | ||
| 15 | + } | ||
| 16 | + }, { | ||
| 17 | + "offset": { | ||
| 18 | + "line": 1, | ||
| 19 | + "column": 0, | ||
| 20 | + }, | ||
| 21 | + "map": { | ||
| 22 | + "version": 3, | ||
| 23 | + "file": "component2.js", | ||
| 24 | + "sources": [], | ||
| 25 | + "mappings": "", | ||
| 26 | + "debugId": "8cf3d888-fc9e-457d-a999-6ffef384b736" | ||
| 27 | + } | ||
| 28 | + }] | ||
| 29 | + } | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,5 @@ | |||
| 1 | + { | ||
| 2 | + "file": "app.js", | ||
| 3 | + "sources": [], | ||
| 4 | + "mappings": [], | ||
| 5 | + } | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,30 @@ | |||
| 1 | + { | ||
| 2 | + "version": 3, | ||
| 3 | + "file": "app.js", | ||
| 4 | + "debugId": "1aad9d9e-2b50-454f-a5f2-0dd5e95c154c", | ||
| 5 | + "sections": [{ | ||
| 6 | + "offset": { | ||
| 7 | + "line": 0, | ||
| 8 | + "column": 0, | ||
| 9 | + }, | ||
| 10 | + "map": { | ||
| 11 | + "version": 3, | ||
| 12 | + "file": "component1.js", | ||
| 13 | + "sources": [], | ||
| 14 | + "mappings": "", | ||
| 15 | + "debugId": "a938a92f-3074-41f7-bfdb-1038430a983c" | ||
| 16 | + } | ||
| 17 | + }, { | ||
| 18 | + "offset": { | ||
| 19 | + "line": 1, | ||
| 20 | + "column": 0, | ||
| 21 | + }, | ||
| 22 | + "map": { | ||
| 23 | + "version": 3, | ||
| 24 | + "file": "component2.js", | ||
| 25 | + "sources": [], | ||
| 26 | + "mappings": "", | ||
| 27 | + "debugId": "8cf3d888-fc9e-457d-a999-6ffef384b736" | ||
| 28 | + } | ||
| 29 | + }] | ||
| 30 | + } | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,6 @@ | |||
| 1 | + { | ||
| 2 | + "file": "app.js", | ||
| 3 | + "sources": [], | ||
| 4 | + "mappings": [], | ||
| 5 | + "debugId": "1aad9d9e-2b50-454f-a5f2-0dd5e95c154c" | ||
| 6 | + } | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,6 @@ | |||
| 1 | + | ||
| 2 | + /// <reference path="../source-map-record.d.ts" /> | ||
| 3 | + | ||
| 4 | + interface SourceMapRecord { | ||
| 5 | + debugId: string|null; | ||
| 6 | + } | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,6 @@ | |||
| 1 | + { | ||
| 2 | + "version": 3, | ||
| 3 | + "sources": [], | ||
| 4 | + "mappings": "", | ||
| 5 | + "debugId": "1aad9d9e-2b50-454f-a5f2-0dd5e95c154c" | ||
| 6 | + } | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,6 @@ | |||
| 1 | + { | ||
| 2 | + "file": null, | ||
| 3 | + "sources": [], | ||
| 4 | + "mappings": [], | ||
| 5 | + "debugId": "1aad9d9e-2b50-454f-a5f2-0dd5e95c154c" | ||
| 6 | + } | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments