Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: githib -> github #58

Merged
merged 1 commit into from Mar 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -6,19 +6,19 @@

<!-- /automd -->

Display APIs compatibility across different JavaScript runtimes. The data is automatically generated, based on MDN [`browser-compat-data`](https://github.com/mdn/browser-compat-data/) format using the runtime tests from [`mdn-bcd-collector`](https://github.com/openwebdocs/mdn-bcd-collector/). Runtimes are displayed with their [WinterCG Runtime Key](https://runtime-keys.proposal.wintercg.org).
Display APIs compatibility across different JavaScript runtimes. The data is automatically generated, based on MDN [`browser-compat-data`](https://github.com/mdn/browser-compat-data) format using the runtime tests from [`mdn-bcd-collector`](https://github.com/openwebdocs/mdn-bcd-collector). Runtimes are displayed with their [WinterCG Runtime Key](https://runtime-keys.proposal.wintercg.org).

## About the data

The generated data is available in the `packages/runtime-compat-data` directory. It is published to npm as `runtime-compat-data`.

The list of APIs is generated by the [browser-compat-data](https://githib.com/mdn/browser-compat-data) project. The features that we include can be found in the `api` and `javascript/builtins` directories. The tests are provided by the [mdn-bcd-collector](Hhttps://github.com/openwebdocs/mdn-bcd-collector/) project. These are a mixture of automatically-generated tests for globals and properties, and manually-written tests for individual options. You can find the current tests in the `data` directory. This file is automatically generated from the `mdn-bcd-collector` repo.
The list of APIs is generated by the [browser-compat-data](https://github.com/mdn/browser-compat-data) project. The features that we include can be found in the `api` and `javascript/builtins` directories. The tests are provided by the [mdn-bcd-collector](Hhttps://github.com/openwebdocs/mdn-bcd-collector) project. These are a mixture of automatically-generated tests for globals and properties, and manually-written tests for individual options. You can find the current tests in the `data` directory. This file is automatically generated from the `mdn-bcd-collector` repo.

These tests are designed to be run in a browser environment, so we use a slightly modified version of the test harness to allow them to run in the runtimes we support. The code for testing each of the runtimes is found in the `src/runtimes` directory. It is slightly different for each runtime, depending on how each is designed to be used. Some (such as Bun, Deno and Node) can run the test file directly from the CLI, while others expect to be run via a server. For these we use the project's own development server, and then use `start-server-and-test` to run the server and make a request for a function that runs the test file. The output of each of these is a `data.json` file in the runtime directory, which contains the results of the tests. If you want to check why a specific test failed, you should start by inspecting the contents of this file as it contains the code and error message for each test.

Another script then processes these files, combines them with the metadata from the `browser-compat-data` project, and then writes the data as a JSON file to the `packages/runtime-compat-data` directory. This is then published to npm.

The tests can be run locally, but the actual data generation process is run nightly on GitHib Actions, which opens a PR if there are any changes.
The tests can be run locally, but the actual data generation process is run nightly on GitHub Actions, which opens a PR if there are any changes.

## Running tests locally

Expand Down