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

test: test documentation enhancements #27434

Merged
merged 4 commits into from
Apr 29, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions test/common/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,20 @@ This directory contains modules used to test the Node.js implementation.

## Table of Contents

* [ArrayStream module](#arraystream-module)
* [Benchmark module](#benchmark-module)
* [Common module API](#common-module-api)
* [Countdown module](#countdown-module)
* [DNS module](#dns-module)
* [Duplex pair helper](#duplex-pair-helper)
* [Environment variables](#environment-variables)
* [Fixtures module](#fixtures-module)
* [Heap dump checker module](#heap-dump-checker-module)
* [hijackstdio module](#hijackstdio-module)
* [HTTP2 module](#http2-module)
* [Internet module](#internet-module)
* [ongc module](#ongc-module)
* [Report module](#report-module)
* [tick module](#tick-module)
* [tmpdir module](#tmpdir-module)
* [WPT module](#wpt-module)
Expand Down Expand Up @@ -495,6 +500,21 @@ which returns an object `{ clientSide, serverSide }` where each side is a

There is no difference between client or server side beyond their names.

## Environment variables

The behavior of the Node.js test suite can be altered using the following
environment variables.

### NODE_SKIP_FLAG_CHECK

If set, command line arguments passed to individual tests are not validated.

### NODE_TEST_KNOWN_GLOBALS

A comma-separated list of variables names that are appended to the global
variable whitelist. Alternatively, if `NODE_TEST_KNOWN_GLOBALS` is set to `'0'`,
global leak detection is disabled.

## Fixtures Module

The `common/fixtures` module provides convenience methods for working with
Expand Down Expand Up @@ -780,6 +800,33 @@ a full `setImmediate()` invocation passes.
`listener` is an object to make it easier to use a closure; the target object
should not be in scope when `listener.ongc()` is created.

## Report Module

The `report` module provides helper functions for testing diagnostic reporting
functionality.

### findReports(pid, dir)

* `pid` [<number>] Process ID to retrieve diagnostic report files for.
* `dir` [<string>] Directory to search for diagnostic report files.
* return [<Array>]

Returns an array of diagnotic report file names found in `dir`. The files should
have been generated by a process whose PID matches `pid`.

### validate(report)

* `report` [<string>] Diagnostic report file name to validate.

Validates the schema of a diagnostic report file whose path is specified in
`report`. If the report fails validation, an exception is thrown.

### validateContent(data)

* `data` [<string>] Contents of a diagnostic report file.

Validates the schema of a diagnostic report whose content is specified in
`data`. If the report fails validation, an exception is thrown.

## tick Module

Expand Down