# How to Run Tests for is-a.dev Domain Configurations: AVA Test Suite Guide

> Execute the AVA test suite for is-a.dev domain configurations by running npm test from the repository root. Validate subdomain setups efficiently.

- Repository: [is-a.dev/register](https://github.com/is-a-dev/register)
- Tags: how-to-guide
- Published: 2026-03-09

---

**Run `npm test` from the repository root to execute the AVA test suite that validates is-a.dev subdomain configurations against project rules.**

The is-a-dev/register repository manages thousands of free subdomains under the is-a.dev namespace. To ensure every domain configuration follows strict formatting, ownership, and DNS rules, the project maintains a comprehensive test suite using AVA. Running these tests locally verifies that your domain JSON files meet all requirements before submitting a pull request.

## Test Command Overview

The test command is defined in the `scripts` section of [`package.json`](https://github.com/is-a-dev/register/blob/main/package.json). According to the is-a-dev/register source code, the configuration executes all test files located under the `tests/` folder using AVA via npx.

```json
"scripts": {
  "test": "npx ava tests/*.test.js"
}

```

Source: [package.json – test script](https://github.com/is-a-dev/register/blob/main/package.json#L6-L8)

Running `npm test` invokes AVA and executes every `*.test.js` file under `tests/`. This includes the core domain-validation tests in [`tests/domains.test.js`](https://github.com/is-a-dev/register/blob/main/tests/domains.test.js), which verify proper nesting, ownership, and naming rules for is-a.dev subdomains.

## Available Test Commands

### Running the Full Test Suite

Use the npm script to execute all validation tests:

```bash

# From the repository root

npm test

```

This command runs `npx ava tests/*.test.js` internally, executing the complete validation suite including domain structure, DNS records, and proxy configuration tests.

### Executing Individual Test Files

For faster feedback during development, run specific test files directly:

```bash

# Run only domain validation tests

npx ava tests/domains.test.js

# Run only DNS record tests

npx ava tests/records.test.js

# Run only proxy configuration tests

npx ava tests/proxy.test.js

```

## Key Test Files and Validation Logic

The test suite is organized into specialized files within the `tests/` directory. Each file targets specific aspects of domain configuration validation.

- **[`tests/domains.test.js`](https://github.com/is-a-dev/register/blob/main/tests/domains.test.js)**: Contains the main validation suite for subdomain structure, ownership verification, and NS-record rules.
- **[`tests/records.test.js`](https://github.com/is-a-dev/register/blob/main/tests/records.test.js)**: Tests handling of DNS record objects and record type validation.
- **[`tests/proxy.test.js`](https://github.com/is-a-dev/register/blob/main/tests/proxy.test.js)**: Verifies the proxy configuration logic for domains using the is-a.dev proxy service.
- **[`tests/pr.test.js`](https://github.com/is-a-dev/register/blob/main/tests/pr.test.js)**: Checks pull-request validation utilities and submission formatting.
- **[`tests/json.test.js`](https://github.com/is-a-dev/register/blob/main/tests/json.test.js)**: Tests JSON parsing and schema validation helpers for domain configuration files.

## Summary

- **Run `npm test`** to execute the complete AVA test suite for is-a.dev domain configurations.
- The test command is defined in [`package.json`](https://github.com/is-a-dev/register/blob/main/package.json) and uses `npx ava tests/*.test.js`.
- **Individual test files** can be run using `npx ava` followed by the specific file path.
- Core validation logic resides in [`tests/domains.test.js`](https://github.com/is-a-dev/register/blob/main/tests/domains.test.js), which checks subdomain rules and ownership.
- Additional tests cover DNS records ([`records.test.js`](https://github.com/is-a-dev/register/blob/main/records.test.js)), proxy settings ([`proxy.test.js`](https://github.com/is-a-dev/register/blob/main/proxy.test.js)), and PR validation ([`pr.test.js`](https://github.com/is-a-dev/register/blob/main/pr.test.js)).

## Frequently Asked Questions

### What test runner does the is-a.dev register repository use?

The repository uses **AVA** as its test runner. AVA is invoked via `npx` in the npm test script defined in [`package.json`](https://github.com/is-a-dev/register/blob/main/package.json), executing all `*.test.js` files under the `tests/` directory.

### How do I run only the domain validation tests?

Execute `npx ava tests/domains.test.js` from the repository root. This runs only the main validation suite that checks subdomain structure, ownership, and naming rules without running the other test files.

### Where are the test scripts defined for is-a.dev domain configurations?

The test script is defined in [`package.json`](https://github.com/is-a-dev/register/blob/main/package.json) in the `scripts` section as `"test": "npx ava tests/*.test.js"`. This configuration tells npm to run AVA against all JavaScript test files in the `tests/` folder.

### What do the is-a.dev tests validate?

The test suite validates multiple aspects of domain configurations: [`tests/domains.test.js`](https://github.com/is-a-dev/register/blob/main/tests/domains.test.js) checks subdomain structure and ownership; [`tests/records.test.js`](https://github.com/is-a-dev/register/blob/main/tests/records.test.js) verifies DNS record formatting; [`tests/proxy.test.js`](https://github.com/is-a-dev/register/blob/main/tests/proxy.test.js) ensures proxy settings are valid; and [`tests/pr.test.js`](https://github.com/is-a-dev/register/blob/main/tests/pr.test.js) validates pull request formatting.