8000 test: add initial test426 coverage · nodejs/node@8feb273 · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit 8feb273

Browse files
legendecasRafaelGSS
authored andcommitted
test: add initial test426 coverage
Source map has been standardized as ECMA426, with a developing test suite. Add an initial coverage of the source map tests. PR-URL: #56436 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
1 parent b9cd789 commit 8feb273
8000

File tree

214 files changed

+18232
-0
lines changed
  • webkit
  • test426
  • Some content is hidden

    Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

    214 files changed

    +18232
    -0
    lines changed

    Makefile

    Lines changed: 4 additions & 0 deletions
    Original file line numberDiff line numberDiff line change
    @@ -609,6 +609,10 @@ test-debug: BUILDTYPE_LOWER=debug ## Run tests on a debug build.
    609609
    test-release test-debug: test-build ## Run tests on a release or debug build.
    610610
    $(PYTHON) tools/test.py $(PARALLEL_ARGS) --mode=$(BUILDTYPE_LOWER)
    611611

    612+
    .PHONY: test-test426
    613+
    test-test426: all ## Run the Web Platform Tests.
    614+
    $(PYTHON) tools/test.py $(PARALLEL_ARGS) test426
    615+
    612616
    .PHONY: test-wpt
    613617
    test-wpt: all ## Run the Web Platform Tests.
    614618
    $(PYTHON) tools/test.py $(PARALLEL_ARGS) wpt

    test/fixtures/test426/LICENSE.md

    Lines changed: 14 additions & 0 deletions
    Original file line numberDiff line numberDiff line change
    @@ -0,0 +1,14 @@
    1+
    The Source Map Tests suite ("Software") is protected by copyright and is being made available under the "BSD License", included below. This Software may be subject to third party rights (rights from parties other than Ecma International), including patent rights, and no licenses under such third party rights are granted under this license even if the third party concerned is a member of Ecma International. SEE THE ECMA CODE OF CONDUCT IN PATENT MATTERS AVAILABLE AT https://www.ecma-international.org/ipr FOR INFORMATION REGARDING THE LICENSING OF PATENT CLAIMS THAT ARE REQUIRED TO IMPLEMENT ECMA INTERNATIONAL STANDARDS*.
    2+
    3+
    Copyright (c) 2024, Ecma International
    4+
    All rights reserved.
    5+
    6+
    Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
    7+
    8+
    1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
    9+
    2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
    10+
    3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
    11+
    12+
    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    13+
    14+
    * Ecma International Standards hereafter means Ecma International Standards as well as Ecma Technical Reports

    test/fixtures/test426/README.md

    Lines changed: 55 additions & 0 deletions
    Original file line numberDiff line numberDiff line change
    @@ -0,0 +1,55 @@
    1+
    # Source Map Tests
    2+
    3+
    This repository holds testing discussions and tests for the the Source Map debugging format. Specifically, we're looking to encourage discussion around:
    4+
    5+
    - Manual and automated testing strategies for Source Maps
    6+
    - Gathering a list of Soure Map generators and consumers
    7+
    - General discussion around deviations between source maps
    8+
    9+
    Open discussion happens in the [GitHub issues](https://github.com/source-map/source-map-tests/issues).
    10+
    11+
    Source Map spec:
    12+
    * Repo: https://github.com/tc39/source-map
    13+
    * Rendered spec: https://tc39.es/source-map/
    14+
    15+
    ## Test cases
    16+
    17+
    This repo also contains cross-implementation test cases that can be run in test
    18+
    suites for source map implementations, including browser devtool and library test
    19+
    suites.
    20+
    21+
    ### Running the tests
    22+
    23+
    #### Tools
    24+
    25+
    [Source map validator](https://github.com/jkup/source-map-validator):
    26+
    * The tests are included in the validator test suite [here](https://github.com/jkup/source-map-validator/blob/main/src/spec-tests.test.ts). You can run them with `npm test`.
    27+
    28+
    #### Browsers
    29+
    30+
    The tests for Firefox are in the Mozilla [source-map](https://github.com/mozilla/source-map) library:
    31+
    * The upstream repo has a [test file](https://github.com/mozilla/source-map/blob/master/test/test-spec-tests.js) for running the spec tests from this repo. They can be run with `npm test`.
    32+
    33+
    How to run in WebKit:
    34+
    * Check out [WebKit](https://github.com/WebKit/WebKit/)
    35+
    * `cd` to the checked out WebKit directory.
    36+
    * Run `git am <this-repo>/webkit/0001-Add-harness-for-source-maps-spec-tests.patch`
    37+
    * Run `Tools/Scripts/build-webkit` (depending on the platform you may need to pass `--gtk` or other flags)
    38+
    * Run `Tools/Scripts/run-webkit-tests LayoutTests/inspector/model/source-map-spec.html` (again, you may need `--gtk` on Linux)
    39+
    40+
    How to run in Chrome Devtools:
    41+
    1. Setup:
    42+
    * Install depot_tools following this [depot_tools guide](https://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/docs/html/depot_tools_tutorial.html#_setting_up)
    43+
    * Check out [Chrome Devtools](https://chromium.googlesource.com/devtools/devtools-frontend):
    44+
    * Run `gclient config https://chromium.googlesource.com/devtools/devtools-frontend --unmanaged`
    45+
    * Run `cd devtools-frontend`
    46+
    * Run `gclient sync`
    47+
    * Run `gn gen out/Default`
    48+
    2. Build:
    49+
    * Run `autoninja -C out/Default`
    50+
    3. Test:
    51+
    * Run `npm run auto-unittest`
    52+
    4. Apply patches from this repo:
    53+
    * Run `git apply <path to .patch file>` in `devtools-frontend` repo
    54+
    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)

    0 commit comments

    Comments
     (0)
    0