# How to Run Tests for Archify: Complete Guide to the Node.js Test Runner

> Learn how to run tests for Archify with Node's built-in test runner. Execute the test suite easily from the repository root for comprehensive code verification.

- Repository: [tt-a1i/archify](https://github.com/tt-a1i/archify)
- Tags: how-to-guide
- Published: 2026-09-12

---

**Run `node scripts/run-tests.mjs` from the repository root to execute Archify's test suite using Node's built-in test runner, which automatically discovers all `*.test.mjs` files across skill directories.**

Archify ships with a dedicated test runner that validates its modular skill architecture without external testing frameworks. This guide explains how to run tests for Archify using the repository's native testing infrastructure located in `scripts/run-tests.mjs`.

## Prerequisites and Setup

Before executing tests, install the development dependencies declared in [`package.json`](https://github.com/tt-a1i/archify/blob/main/package.json). Archify relies exclusively on Node's standard library for its runtime, so only standard package management is required.

```bash
npm ci

```

Alternatively, use `npm install` or `yarn install` if you prefer. No additional test frameworks like Jest or Mocha are necessary since Archify utilizes Node's native test runner.

## Running the Full Test Suite

Execute the primary test script from the repository root to run all tests:

```bash
node scripts/run-tests.mjs

```

The `scripts/run-tests.mjs` file performs the following operations:

- Locates the `test/` directory within each skill folder
- Builds an array of all files ending with `.test.mjs`
- Invokes `node --test` (or `node --test-concurrency=2` when supported) with the discovered file list
- Streams output to stdout/stderr and exits with the appropriate status code

A green-colored summary indicates successful completion. Any failures display file and line details for debugging.

## Test Discovery and File Structure

Archify organizes tests within skill-specific directories. The runner scans for files matching the `*.test.mjs` pattern.

Key test files in the repository include:

- `integrations/deepseek-harness/test/zero-regression.test.mjs` – Validates the DeepSeek Harness integration
- `archify/test/workflow-semantic-contract.test.mjs` – Tests core workflow semantic validation logic

Place new test files in the `test/` subdirectory of the relevant skill to ensure automatic discovery by the runner.

## Running Individual Test Files

To execute a specific test file rather than the full suite, bypass the runner script and invoke Node's test runner directly:

```bash
node --test test/your-skill/example.test.mjs

```

This approach is useful when debugging specific components or developing new features in isolation without executing the entire repository's test suite.

## Configuring Test Concurrency

The `scripts/run-tests.mjs` runner automatically detects support for the `--test-concurrency` flag available in newer Node versions. When supported, it appends `--test-concurrency=2` to parallelize execution across available cores.

To modify concurrency settings, edit the `scripts/run-tests.mjs` file directly and adjust the concurrency parameter passed to the Node test runner.

## Summary

- **Install dependencies** using `npm ci` to prepare the environment
- **Run the full suite** with `node scripts/run-tests.mjs` from the repository root
- **Test discovery** automatically finds all `*.test.mjs` files under skill `test/` directories
- **Individual files** can be executed using `node --test` with the specific file path
- **Concurrency** is auto-configured to `--test-concurrency=2` when supported by your Node version

## Frequently Asked Questions

### Where is the Archify test runner script located?

The test runner is located at `scripts/run-tests.mjs` in the repository root. This script orchestrates test discovery and execution using Node's built-in test runner rather than external testing frameworks.

### What naming convention does Archify use for test files?

Archify recognizes files ending with `.test.mjs`. The runner recursively searches for these files within `test/` subdirectories of each skill to build the test execution list.

### How does Archify handle parallel test execution?

When your Node.js version supports the `--test-concurrency` flag, the `scripts/run-tests.mjs` runner automatically appends `--test-concurrency=2` to enable parallel execution. You can manually adjust this value by editing the concurrency configuration in the runner script.

### Can I run tests for a single skill or file instead of the entire suite?

Yes. While `node scripts/run-tests.mjs` runs all discovered tests, you can execute individual files using `node --test` followed by the specific file path, such as `node --test archify/test/workflow-semantic-contract.test.mjs`.