11cb0ef41Sopenharmony_ci# Node.js Core Tests
21cb0ef41Sopenharmony_ci
31cb0ef41Sopenharmony_ciThis directory contains code and data used to test the Node.js implementation.
41cb0ef41Sopenharmony_ci
51cb0ef41Sopenharmony_ciFor a detailed guide on how to write tests in this
61cb0ef41Sopenharmony_cidirectory, see [the guide on writing tests](../doc/contributing/writing-tests.md).
71cb0ef41Sopenharmony_ci
81cb0ef41Sopenharmony_ciOn how to run tests in this directory, see
91cb0ef41Sopenharmony_ci[the contributing guide](../doc/contributing/pull-requests.md#step-6-test).
101cb0ef41Sopenharmony_ci
111cb0ef41Sopenharmony_ciFor the tests to run on Windows, be sure to clone Node.js source code with the
121cb0ef41Sopenharmony_ci`autocrlf` git config flag set to true.
131cb0ef41Sopenharmony_ci
141cb0ef41Sopenharmony_ci## Test Directories
151cb0ef41Sopenharmony_ci
161cb0ef41Sopenharmony_ci| Directory        | Runs on CI | Purpose                                                                                                                                                                                                                                                                                              |
171cb0ef41Sopenharmony_ci| ---------------- | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
181cb0ef41Sopenharmony_ci| `abort`          | Yes        | Tests that use `--abort-on-uncaught-exception` and other situations where we want to test something but avoid generating a core file.                                                                                                                                                                |
191cb0ef41Sopenharmony_ci| `addons`         | Yes        | Tests for [addon](https://nodejs.org/api/addons.html) functionality along with some tests that require an addon.                                                                                                                                                                                     |
201cb0ef41Sopenharmony_ci| `async-hooks`    | Yes        | Tests for [async\_hooks](https://nodejs.org/api/async_hooks.html) functionality.                                                                                                                                                                                                                     |
211cb0ef41Sopenharmony_ci| `benchmark`      | Yes        | Test minimal functionality of benchmarks.                                                                                                                                                                                                                                                            |
221cb0ef41Sopenharmony_ci| `cctest`         | Yes        | C++ tests that are run as part of the build process.                                                                                                                                                                                                                                                 |
231cb0ef41Sopenharmony_ci| `code-cache`     | No         | Tests for a Node.js binary compiled with V8 code cache.                                                                                                                                                                                                                                              |
241cb0ef41Sopenharmony_ci| `common`         |            | Common modules shared among many tests. [Documentation](./common/README.md)                                                                                                                                                                                                                          |
251cb0ef41Sopenharmony_ci| `doctool`        | Yes        | Tests for the documentation generator.                                                                                                                                                                                                                                                               |
261cb0ef41Sopenharmony_ci| `es-module`      | Yes        | Test ESM module loading.                                                                                                                                                                                                                                                                             |
271cb0ef41Sopenharmony_ci| `fixtures`       |            | Test fixtures used in various tests throughout the test suite.                                                                                                                                                                                                                                       |
281cb0ef41Sopenharmony_ci| `internet`       | No         | Tests that make real outbound network connections. Tests for networking related modules may also be present in other directories, but those tests do not make outbound connections.                                                                                                                  |
291cb0ef41Sopenharmony_ci| `js-native-api`  | Yes        | Tests for Node.js-agnostic [Node-API](https://nodejs.org/api/n-api.html) functionality.                                                                                                                                                                                                              |
301cb0ef41Sopenharmony_ci| `known_issues`   | Yes        | Tests reproducing known issues within the system. All tests inside of this directory are expected to fail. If a test doesn't fail on certain platforms, those should be skipped via `known_issues.status`.                                                                                           |
311cb0ef41Sopenharmony_ci| `message`        | Yes        | Tests for messages that are output for various conditions (`console.log`, error messages etc.)                                                                                                                                                                                                       |
321cb0ef41Sopenharmony_ci| `node-api`       | Yes        | Tests for Node.js-specific [Node-API](https://nodejs.org/api/n-api.html) functionality.                                                                                                                                                                                                              |
331cb0ef41Sopenharmony_ci| `parallel`       | Yes        | Various tests that are able to be run in parallel.                                                                                                                                                                                                                                                   |
341cb0ef41Sopenharmony_ci| `pseudo-tty`     | Yes        | Tests that require stdin/stdout/stderr to be a TTY.                                                                                                                                                                                                                                                  |
351cb0ef41Sopenharmony_ci| `pummel`         | No         | Various tests for various modules / system functionality operating under load.                                                                                                                                                                                                                       |
361cb0ef41Sopenharmony_ci| `sequential`     | Yes        | Various tests that must not run in parallel.                                                                                                                                                                                                                                                         |
371cb0ef41Sopenharmony_ci| `testpy`         |            | Test configuration utility used by various test suites.                                                                                                                                                                                                                                              |
381cb0ef41Sopenharmony_ci| `tick-processor` | No         | Tests for the V8 tick processor integration. The tests are for the logic in `lib/internal/v8_prof_processor.js` and `lib/internal/v8_prof_polyfill.js`. The tests confirm that the profile processor packages the correct set of scripts from V8 and introduces the correct platform specific logic. |
391cb0ef41Sopenharmony_ci| `v8-updates`     | No         | Tests for V8 performance integration.                                                                                                                                                                                                                                                                |
40