> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.doc-detective.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.doc-detective.com/_mcp/server.

# Step routing, written as tests

> Short procedures that each route on one step result with `onPass`, `onFail`, `onWarning`, or `onSkip`, in every supported format.

Each example on this page varies one setting in a short procedure, shown as prose, detected tests, inline tests, and a standalone spec. For what each tab holds, see [Navigation and interaction](/reference/docs-as-tests/navigation-interaction).

Detection finds no steps in these procedures, because the URLs and commands sit in code. So every variant runs the same `step` statements, and the detected and inline files differ only in `detectSteps`.

An `onFail` or `onWarning` entry on a step that passes never applies. Those examples show the shape, and their effect says what happens when the entry applies.

## Step routing permutations

### `onPass`, `continue`

**Varies:** `step.onPass` · **Value:** `[{"continue": true}]` · **Effect:** moves on to the next step. This is the default after a pass.

#### Prose

#### Markdown

**`prose.md`**

````markdown title="prose.md"
# Print tool versions

1. Print the Node.js version:

   ```shell
   node --version
   ```
2. Print the npm version:

   ```shell
   npm --version
   ```
````

#### MDX

**`prose.mdx`**

````mdx title="prose.mdx"
# Print tool versions

1. Print the Node.js version:

   ```shell
   node --version
   ```
2. Print the npm version:

   ```shell
   npm --version
   ```
````

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Print tool versions

. Print the Node.js version:
+
[source,shell]
----
node --version
----
. Print the npm version:
+
[source,shell]
----
npm --version
----
```

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Print tool versions</title></head>
<body>
<h1>Print tool versions</h1>
<ol>
  <li>Print the Node.js version:
    <pre><code class="language-shell">node --version</code></pre></li>
  <li>Print the npm version:
    <pre><code class="language-shell">npm --version</code></pre></li>
</ol>
</body>
</html>
```

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Print tool versions
===================

#. Print the Node.js version:

   .. code-block:: shell

      node --version

#. Print the npm version:

   .. code-block:: shell

      npm --version
```

#### DITA

**`prose.dita`**

```xml title="prose.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="data-route-onpass-continue">
  <title>Print tool versions</title>
  <taskbody>
    <steps>
      <step><cmd>Print the Node.js version:</cmd>
        <info><codeblock outputclass="language-shell">node --version</codeblock></info></step>
      <step><cmd>Print the npm version:</cmd>
        <info><codeblock outputclass="language-shell">npm --version</codeblock></info></step>
    </steps>
  </taskbody>
</task>
```

#### Detected

#### Markdown

**`detected.md`**

````markdown title="detected.md"
<!-- test {"testId":"data-route-onpass-continue","detectSteps":true} -->

# Print tool versions

1. Print the Node.js version:

   ```shell
   node --version
   ```
   <!-- step {"runShell":"node --version","onPass":[{"continue":true}]} -->
2. Print the npm version:

   ```shell
   npm --version
   ```
   <!-- step {"stepId":"npm","runShell":"npm --version"} -->

<!-- test end -->
````

#### MDX

**`detected.mdx`**

````mdx title="detected.mdx"
{/* test {"testId":"data-route-onpass-continue","detectSteps":true} */}

# Print tool versions

1. Print the Node.js version:

   ```shell
   node --version
   ```
   {/* step {"runShell":"node --version","onPass":[{"continue":true}]} */}
2. Print the npm version:

   ```shell
   npm --version
   ```
   {/* step {"stepId":"npm","runShell":"npm --version"} */}

{/* test end */}
````

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Print tool versions

// (test {"testId":"data-route-onpass-continue","detectSteps":true})

. Print the Node.js version:
+
[source,shell]
----
node --version
----
+
// (step {"runShell":"node --version","onPass":[{"continue":true}]})
. Print the npm version:
+
[source,shell]
----
npm --version
----
+
// (step {"stepId":"npm","runShell":"npm --version"})

// (test end)
```

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Print tool versions</title></head>
<body>
<!-- test {"testId":"data-route-onpass-continue","detectSteps":true} -->
<h1>Print tool versions</h1>
<ol>
  <li>Print the Node.js version:
    <pre><code class="language-shell">node --version</code></pre>
    <!-- step {"runShell":"node --version","onPass":[{"continue":true}]} --></li>
  <li>Print the npm version:
    <pre><code class="language-shell">npm --version</code></pre>
    <!-- step {"stepId":"npm","runShell":"npm --version"} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Print tool versions
===================

.. test {"testId":"data-route-onpass-continue","detectSteps":true}

#. Print the Node.js version:

   .. code-block:: shell

      node --version

   .. step {"runShell":"node --version","onPass":[{"continue":true}]}

#. Print the npm version:

   .. code-block:: shell

      npm --version

   .. step {"stepId":"npm","runShell":"npm --version"}

.. test end
```

#### DITA

**`detected.dita`**

```xml title="detected.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="data-route-onpass-continue">
  <title>Print tool versions</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"data-route-onpass-continue","detectSteps":true}'/>
    <steps>
      <step><cmd>Print the Node.js version:</cmd>
        <info><codeblock outputclass="language-shell">node --version</codeblock>
          <data name="doc-detective" value='step {"runShell":"node --version","onPass":[{"continue":true}]}'/></info></step>
      <step><cmd>Print the npm version:</cmd>
        <info><codeblock outputclass="language-shell">npm --version</codeblock>
          <data name="doc-detective" value='step {"stepId":"npm","runShell":"npm --version"}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Inline

#### Markdown

**`inline.md`**

````markdown title="inline.md"
<!-- test {"testId":"data-route-onpass-continue","detectSteps":false} -->

# Print tool versions

1. Print the Node.js version:

   ```shell
   node --version
   ```
   <!-- step {"runShell":"node --version","onPass":[{"continue":true}]} -->
2. Print the npm version:

   ```shell
   npm --version
   ```
   <!-- step {"stepId":"npm","runShell":"npm --version"} -->

<!-- test end -->
````

#### MDX

**`inline.mdx`**

````mdx title="inline.mdx"
{/* test {"testId":"data-route-onpass-continue","detectSteps":false} */}

# Print tool versions

1. Print the Node.js version:

   ```shell
   node --version
   ```
   {/* step {"runShell":"node --version","onPass":[{"continue":true}]} */}
2. Print the npm version:

   ```shell
   npm --version
   ```
   {/* step {"stepId":"npm","runShell":"npm --version"} */}

{/* test end */}
````

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Print tool versions

// (test {"testId":"data-route-onpass-continue","detectSteps":false})

. Print the Node.js version:
+
[source,shell]
----
node --version
----
+
// (step {"runShell":"node --version","onPass":[{"continue":true}]})
. Print the npm version:
+
[source,shell]
----
npm --version
----
+
// (step {"stepId":"npm","runShell":"npm --version"})

// (test end)
```

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Print tool versions</title></head>
<body>
<!-- test {"testId":"data-route-onpass-continue","detectSteps":false} -->
<h1>Print tool versions</h1>
<ol>
  <li>Print the Node.js version:
    <pre><code class="language-shell">node --version</code></pre>
    <!-- step {"runShell":"node --version","onPass":[{"continue":true}]} --></li>
  <li>Print the npm version:
    <pre><code class="language-shell">npm --version</code></pre>
    <!-- step {"stepId":"npm","runShell":"npm --version"} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Print tool versions
===================

.. test {"testId":"data-route-onpass-continue","detectSteps":false}

#. Print the Node.js version:

   .. code-block:: shell

      node --version

   .. step {"runShell":"node --version","onPass":[{"continue":true}]}

#. Print the npm version:

   .. code-block:: shell

      npm --version

   .. step {"stepId":"npm","runShell":"npm --version"}

.. test end
```

#### DITA

**`inline.dita`**

```xml title="inline.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="data-route-onpass-continue">
  <title>Print tool versions</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"data-route-onpass-continue","detectSteps":false}'/>
    <steps>
      <step><cmd>Print the Node.js version:</cmd>
        <info><codeblock outputclass="language-shell">node --version</codeblock>
          <data name="doc-detective" value='step {"runShell":"node --version","onPass":[{"continue":true}]}'/></info></step>
      <step><cmd>Print the npm version:</cmd>
        <info><codeblock outputclass="language-shell">npm --version</codeblock>
          <data name="doc-detective" value='step {"stepId":"npm","runShell":"npm --version"}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "data-route-onpass-continue",
      "steps": [
        {
          "runShell": "node --version",
          "onPass": [
            {
              "continue": true
            }
          ]
        },
        {
          "stepId": "npm",
          "runShell": "npm --version"
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: data-route-onpass-continue
    steps:
      - runShell: node --version
        onPass:
          - continue: true
      - stepId: npm
        runShell: npm --version
```

### `onPass`, `stop`

**Varies:** `step.onPass` · **Value:** `[{"stop": "test"}]` · **Effect:** stops the test after this step passes. The npm step is skipped, and the test passes.

#### Prose

#### Markdown

**`prose.md`**

````markdown title="prose.md"
# Print the Node.js version only

1. Print the Node.js version:

   ```shell
   node --version
   ```
2. Print the npm version:

   ```shell
   npm --version
   ```
````

#### MDX

**`prose.mdx`**

````mdx title="prose.mdx"
# Print the Node.js version only

1. Print the Node.js version:

   ```shell
   node --version
   ```
2. Print the npm version:

   ```shell
   npm --version
   ```
````

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Print the Node.js version only

. Print the Node.js version:
+
[source,shell]
----
node --version
----
. Print the npm version:
+
[source,shell]
----
npm --version
----
```

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Print the Node.js version only</title></head>
<body>
<h1>Print the Node.js version only</h1>
<ol>
  <li>Print the Node.js version:
    <pre><code class="language-shell">node --version</code></pre></li>
  <li>Print the npm version:
    <pre><code class="language-shell">npm --version</code></pre></li>
</ol>
</body>
</html>
```

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Print the Node.js version only
==============================

#. Print the Node.js version:

   .. code-block:: shell

      node --version

#. Print the npm version:

   .. code-block:: shell

      npm --version
```

#### DITA

**`prose.dita`**

```xml title="prose.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="data-route-onpass-stop">
  <title>Print the Node.js version only</title>
  <taskbody>
    <steps>
      <step><cmd>Print the Node.js version:</cmd>
        <info><codeblock outputclass="language-shell">node --version</codeblock></info></step>
      <step><cmd>Print the npm version:</cmd>
        <info><codeblock outputclass="language-shell">npm --version</codeblock></info></step>
    </steps>
  </taskbody>
</task>
```

#### Detected

#### Markdown

**`detected.md`**

````markdown title="detected.md"
<!-- test {"testId":"data-route-onpass-stop","detectSteps":true} -->

# Print the Node.js version only

1. Print the Node.js version:

   ```shell
   node --version
   ```
   <!-- step {"runShell":"node --version","onPass":[{"stop":"test"}]} -->
2. Print the npm version:

   ```shell
   npm --version
   ```
   <!-- step {"stepId":"npm","runShell":"npm --version"} -->

<!-- test end -->
````

#### MDX

**`detected.mdx`**

````mdx title="detected.mdx"
{/* test {"testId":"data-route-onpass-stop","detectSteps":true} */}

# Print the Node.js version only

1. Print the Node.js version:

   ```shell
   node --version
   ```
   {/* step {"runShell":"node --version","onPass":[{"stop":"test"}]} */}
2. Print the npm version:

   ```shell
   npm --version
   ```
   {/* step {"stepId":"npm","runShell":"npm --version"} */}

{/* test end */}
````

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Print the Node.js version only

// (test {"testId":"data-route-onpass-stop","detectSteps":true})

. Print the Node.js version:
+
[source,shell]
----
node --version
----
+
// (step {"runShell":"node --version","onPass":[{"stop":"test"}]})
. Print the npm version:
+
[source,shell]
----
npm --version
----
+
// (step {"stepId":"npm","runShell":"npm --version"})

// (test end)
```

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Print the Node.js version only</title></head>
<body>
<!-- test {"testId":"data-route-onpass-stop","detectSteps":true} -->
<h1>Print the Node.js version only</h1>
<ol>
  <li>Print the Node.js version:
    <pre><code class="language-shell">node --version</code></pre>
    <!-- step {"runShell":"node --version","onPass":[{"stop":"test"}]} --></li>
  <li>Print the npm version:
    <pre><code class="language-shell">npm --version</code></pre>
    <!-- step {"stepId":"npm","runShell":"npm --version"} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Print the Node.js version only
==============================

.. test {"testId":"data-route-onpass-stop","detectSteps":true}

#. Print the Node.js version:

   .. code-block:: shell

      node --version

   .. step {"runShell":"node --version","onPass":[{"stop":"test"}]}

#. Print the npm version:

   .. code-block:: shell

      npm --version

   .. step {"stepId":"npm","runShell":"npm --version"}

.. test end
```

#### DITA

**`detected.dita`**

```xml title="detected.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="data-route-onpass-stop">
  <title>Print the Node.js version only</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"data-route-onpass-stop","detectSteps":true}'/>
    <steps>
      <step><cmd>Print the Node.js version:</cmd>
        <info><codeblock outputclass="language-shell">node --version</codeblock>
          <data name="doc-detective" value='step {"runShell":"node --version","onPass":[{"stop":"test"}]}'/></info></step>
      <step><cmd>Print the npm version:</cmd>
        <info><codeblock outputclass="language-shell">npm --version</codeblock>
          <data name="doc-detective" value='step {"stepId":"npm","runShell":"npm --version"}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Inline

#### Markdown

**`inline.md`**

````markdown title="inline.md"
<!-- test {"testId":"data-route-onpass-stop","detectSteps":false} -->

# Print the Node.js version only

1. Print the Node.js version:

   ```shell
   node --version
   ```
   <!-- step {"runShell":"node --version","onPass":[{"stop":"test"}]} -->
2. Print the npm version:

   ```shell
   npm --version
   ```
   <!-- step {"stepId":"npm","runShell":"npm --version"} -->

<!-- test end -->
````

#### MDX

**`inline.mdx`**

````mdx title="inline.mdx"
{/* test {"testId":"data-route-onpass-stop","detectSteps":false} */}

# Print the Node.js version only

1. Print the Node.js version:

   ```shell
   node --version
   ```
   {/* step {"runShell":"node --version","onPass":[{"stop":"test"}]} */}
2. Print the npm version:

   ```shell
   npm --version
   ```
   {/* step {"stepId":"npm","runShell":"npm --version"} */}

{/* test end */}
````

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Print the Node.js version only

// (test {"testId":"data-route-onpass-stop","detectSteps":false})

. Print the Node.js version:
+
[source,shell]
----
node --version
----
+
// (step {"runShell":"node --version","onPass":[{"stop":"test"}]})
. Print the npm version:
+
[source,shell]
----
npm --version
----
+
// (step {"stepId":"npm","runShell":"npm --version"})

// (test end)
```

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Print the Node.js version only</title></head>
<body>
<!-- test {"testId":"data-route-onpass-stop","detectSteps":false} -->
<h1>Print the Node.js version only</h1>
<ol>
  <li>Print the Node.js version:
    <pre><code class="language-shell">node --version</code></pre>
    <!-- step {"runShell":"node --version","onPass":[{"stop":"test"}]} --></li>
  <li>Print the npm version:
    <pre><code class="language-shell">npm --version</code></pre>
    <!-- step {"stepId":"npm","runShell":"npm --version"} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Print the Node.js version only
==============================

.. test {"testId":"data-route-onpass-stop","detectSteps":false}

#. Print the Node.js version:

   .. code-block:: shell

      node --version

   .. step {"runShell":"node --version","onPass":[{"stop":"test"}]}

#. Print the npm version:

   .. code-block:: shell

      npm --version

   .. step {"stepId":"npm","runShell":"npm --version"}

.. test end
```

#### DITA

**`inline.dita`**

```xml title="inline.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="data-route-onpass-stop">
  <title>Print the Node.js version only</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"data-route-onpass-stop","detectSteps":false}'/>
    <steps>
      <step><cmd>Print the Node.js version:</cmd>
        <info><codeblock outputclass="language-shell">node --version</codeblock>
          <data name="doc-detective" value='step {"runShell":"node --version","onPass":[{"stop":"test"}]}'/></info></step>
      <step><cmd>Print the npm version:</cmd>
        <info><codeblock outputclass="language-shell">npm --version</codeblock>
          <data name="doc-detective" value='step {"stepId":"npm","runShell":"npm --version"}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "data-route-onpass-stop",
      "steps": [
        {
          "runShell": "node --version",
          "onPass": [
            {
              "stop": "test"
            }
          ]
        },
        {
          "stepId": "npm",
          "runShell": "npm --version"
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: data-route-onpass-stop
    steps:
      - runShell: node --version
        onPass:
          - stop: test
      - stepId: npm
        runShell: npm --version
```

### `onPass`, `goToStep`

**Varies:** `step.onPass` · **Value:** `[{"goToStep": "path"}]` · **Effect:** jumps to the step whose `stepId` is `path`. The npm step doesn't run and isn't in the results.

#### Prose

#### Markdown

**`prose.md`**

````markdown title="prose.md"
# Skip ahead after a version check

1. Print the Node.js version:

   ```shell
   node --version
   ```
2. Print the npm version:

   ```shell
   npm --version
   ```
3. Find the Node.js executable:

   ```shell
   command -v node
   ```
````

#### MDX

**`prose.mdx`**

````mdx title="prose.mdx"
# Skip ahead after a version check

1. Print the Node.js version:

   ```shell
   node --version
   ```
2. Print the npm version:

   ```shell
   npm --version
   ```
3. Find the Node.js executable:

   ```shell
   command -v node
   ```
````

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Skip ahead after a version check

. Print the Node.js version:
+
[source,shell]
----
node --version
----
. Print the npm version:
+
[source,shell]
----
npm --version
----
. Find the Node.js executable:
+
[source,shell]
----
command -v node
----
```

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Skip ahead after a version check</title></head>
<body>
<h1>Skip ahead after a version check</h1>
<ol>
  <li>Print the Node.js version:
    <pre><code class="language-shell">node --version</code></pre></li>
  <li>Print the npm version:
    <pre><code class="language-shell">npm --version</code></pre></li>
  <li>Find the Node.js executable:
    <pre><code class="language-shell">command -v node</code></pre></li>
</ol>
</body>
</html>
```

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Skip ahead after a version check
================================

#. Print the Node.js version:

   .. code-block:: shell

      node --version

#. Print the npm version:

   .. code-block:: shell

      npm --version

#. Find the Node.js executable:

   .. code-block:: shell

      command -v node
```

#### DITA

**`prose.dita`**

```xml title="prose.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="data-route-onpass-gotostep">
  <title>Skip ahead after a version check</title>
  <taskbody>
    <steps>
      <step><cmd>Print the Node.js version:</cmd>
        <info><codeblock outputclass="language-shell">node --version</codeblock></info></step>
      <step><cmd>Print the npm version:</cmd>
        <info><codeblock outputclass="language-shell">npm --version</codeblock></info></step>
      <step><cmd>Find the Node.js executable:</cmd>
        <info><codeblock outputclass="language-shell">command -v node</codeblock></info></step>
    </steps>
  </taskbody>
</task>
```

#### Detected

#### Markdown

**`detected.md`**

````markdown title="detected.md"
<!-- test {"testId":"data-route-onpass-gotostep","detectSteps":true} -->

# Skip ahead after a version check

1. Print the Node.js version:

   ```shell
   node --version
   ```
   <!-- step {"runShell":"node --version","onPass":[{"goToStep":"path"}]} -->
2. Print the npm version:

   ```shell
   npm --version
   ```
   <!-- step {"stepId":"npm","runShell":"npm --version"} -->
3. Find the Node.js executable:

   ```shell
   command -v node
   ```
   <!-- step {"stepId":"path","runShell":"command -v node"} -->

<!-- test end -->
````

#### MDX

**`detected.mdx`**

````mdx title="detected.mdx"
{/* test {"testId":"data-route-onpass-gotostep","detectSteps":true} */}

# Skip ahead after a version check

1. Print the Node.js version:

   ```shell
   node --version
   ```
   {/* step {"runShell":"node --version","onPass":[{"goToStep":"path"}]} */}
2. Print the npm version:

   ```shell
   npm --version
   ```
   {/* step {"stepId":"npm","runShell":"npm --version"} */}
3. Find the Node.js executable:

   ```shell
   command -v node
   ```
   {/* step {"stepId":"path","runShell":"command -v node"} */}

{/* test end */}
````

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Skip ahead after a version check

// (test {"testId":"data-route-onpass-gotostep","detectSteps":true})

. Print the Node.js version:
+
[source,shell]
----
node --version
----
+
// (step {"runShell":"node --version","onPass":[{"goToStep":"path"}]})
. Print the npm version:
+
[source,shell]
----
npm --version
----
+
// (step {"stepId":"npm","runShell":"npm --version"})
. Find the Node.js executable:
+
[source,shell]
----
command -v node
----
+
// (step {"stepId":"path","runShell":"command -v node"})

// (test end)
```

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Skip ahead after a version check</title></head>
<body>
<!-- test {"testId":"data-route-onpass-gotostep","detectSteps":true} -->
<h1>Skip ahead after a version check</h1>
<ol>
  <li>Print the Node.js version:
    <pre><code class="language-shell">node --version</code></pre>
    <!-- step {"runShell":"node --version","onPass":[{"goToStep":"path"}]} --></li>
  <li>Print the npm version:
    <pre><code class="language-shell">npm --version</code></pre>
    <!-- step {"stepId":"npm","runShell":"npm --version"} --></li>
  <li>Find the Node.js executable:
    <pre><code class="language-shell">command -v node</code></pre>
    <!-- step {"stepId":"path","runShell":"command -v node"} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Skip ahead after a version check
================================

.. test {"testId":"data-route-onpass-gotostep","detectSteps":true}

#. Print the Node.js version:

   .. code-block:: shell

      node --version

   .. step {"runShell":"node --version","onPass":[{"goToStep":"path"}]}

#. Print the npm version:

   .. code-block:: shell

      npm --version

   .. step {"stepId":"npm","runShell":"npm --version"}

#. Find the Node.js executable:

   .. code-block:: shell

      command -v node

   .. step {"stepId":"path","runShell":"command -v node"}

.. test end
```

#### DITA

**`detected.dita`**

```xml title="detected.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="data-route-onpass-gotostep">
  <title>Skip ahead after a version check</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"data-route-onpass-gotostep","detectSteps":true}'/>
    <steps>
      <step><cmd>Print the Node.js version:</cmd>
        <info><codeblock outputclass="language-shell">node --version</codeblock>
          <data name="doc-detective" value='step {"runShell":"node --version","onPass":[{"goToStep":"path"}]}'/></info></step>
      <step><cmd>Print the npm version:</cmd>
        <info><codeblock outputclass="language-shell">npm --version</codeblock>
          <data name="doc-detective" value='step {"stepId":"npm","runShell":"npm --version"}'/></info></step>
      <step><cmd>Find the Node.js executable:</cmd>
        <info><codeblock outputclass="language-shell">command -v node</codeblock>
          <data name="doc-detective" value='step {"stepId":"path","runShell":"command -v node"}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Inline

#### Markdown

**`inline.md`**

````markdown title="inline.md"
<!-- test {"testId":"data-route-onpass-gotostep","detectSteps":false} -->

# Skip ahead after a version check

1. Print the Node.js version:

   ```shell
   node --version
   ```
   <!-- step {"runShell":"node --version","onPass":[{"goToStep":"path"}]} -->
2. Print the npm version:

   ```shell
   npm --version
   ```
   <!-- step {"stepId":"npm","runShell":"npm --version"} -->
3. Find the Node.js executable:

   ```shell
   command -v node
   ```
   <!-- step {"stepId":"path","runShell":"command -v node"} -->

<!-- test end -->
````

#### MDX

**`inline.mdx`**

````mdx title="inline.mdx"
{/* test {"testId":"data-route-onpass-gotostep","detectSteps":false} */}

# Skip ahead after a version check

1. Print the Node.js version:

   ```shell
   node --version
   ```
   {/* step {"runShell":"node --version","onPass":[{"goToStep":"path"}]} */}
2. Print the npm version:

   ```shell
   npm --version
   ```
   {/* step {"stepId":"npm","runShell":"npm --version"} */}
3. Find the Node.js executable:

   ```shell
   command -v node
   ```
   {/* step {"stepId":"path","runShell":"command -v node"} */}

{/* test end */}
````

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Skip ahead after a version check

// (test {"testId":"data-route-onpass-gotostep","detectSteps":false})

. Print the Node.js version:
+
[source,shell]
----
node --version
----
+
// (step {"runShell":"node --version","onPass":[{"goToStep":"path"}]})
. Print the npm version:
+
[source,shell]
----
npm --version
----
+
// (step {"stepId":"npm","runShell":"npm --version"})
. Find the Node.js executable:
+
[source,shell]
----
command -v node
----
+
// (step {"stepId":"path","runShell":"command -v node"})

// (test end)
```

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Skip ahead after a version check</title></head>
<body>
<!-- test {"testId":"data-route-onpass-gotostep","detectSteps":false} -->
<h1>Skip ahead after a version check</h1>
<ol>
  <li>Print the Node.js version:
    <pre><code class="language-shell">node --version</code></pre>
    <!-- step {"runShell":"node --version","onPass":[{"goToStep":"path"}]} --></li>
  <li>Print the npm version:
    <pre><code class="language-shell">npm --version</code></pre>
    <!-- step {"stepId":"npm","runShell":"npm --version"} --></li>
  <li>Find the Node.js executable:
    <pre><code class="language-shell">command -v node</code></pre>
    <!-- step {"stepId":"path","runShell":"command -v node"} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Skip ahead after a version check
================================

.. test {"testId":"data-route-onpass-gotostep","detectSteps":false}

#. Print the Node.js version:

   .. code-block:: shell

      node --version

   .. step {"runShell":"node --version","onPass":[{"goToStep":"path"}]}

#. Print the npm version:

   .. code-block:: shell

      npm --version

   .. step {"stepId":"npm","runShell":"npm --version"}

#. Find the Node.js executable:

   .. code-block:: shell

      command -v node

   .. step {"stepId":"path","runShell":"command -v node"}

.. test end
```

#### DITA

**`inline.dita`**

```xml title="inline.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="data-route-onpass-gotostep">
  <title>Skip ahead after a version check</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"data-route-onpass-gotostep","detectSteps":false}'/>
    <steps>
      <step><cmd>Print the Node.js version:</cmd>
        <info><codeblock outputclass="language-shell">node --version</codeblock>
          <data name="doc-detective" value='step {"runShell":"node --version","onPass":[{"goToStep":"path"}]}'/></info></step>
      <step><cmd>Print the npm version:</cmd>
        <info><codeblock outputclass="language-shell">npm --version</codeblock>
          <data name="doc-detective" value='step {"stepId":"npm","runShell":"npm --version"}'/></info></step>
      <step><cmd>Find the Node.js executable:</cmd>
        <info><codeblock outputclass="language-shell">command -v node</codeblock>
          <data name="doc-detective" value='step {"stepId":"path","runShell":"command -v node"}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "data-route-onpass-gotostep",
      "steps": [
        {
          "runShell": "node --version",
          "onPass": [
            {
              "goToStep": "path"
            }
          ]
        },
        {
          "stepId": "npm",
          "runShell": "npm --version"
        },
        {
          "stepId": "path",
          "runShell": "command -v node"
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: data-route-onpass-gotostep
    steps:
      - runShell: node --version
        onPass:
          - goToStep: path
      - stepId: npm
        runShell: npm --version
      - stepId: path
        runShell: command -v node
```

### `onPass`, `retry`

**Varies:** `step.onPass` · **Value:** `[{"retry": {"limit": 1}}]` · **Effect:** runs the passing step once more, then falls through to the default and continues. The result reports `"attempts": 2`.

#### Prose

#### Markdown

**`prose.md`**

````markdown title="prose.md"
# Print the Node.js version twice

1. Print the Node.js version:

   ```shell
   node --version
   ```
2. Print the npm version:

   ```shell
   npm --version
   ```
````

#### MDX

**`prose.mdx`**

````mdx title="prose.mdx"
# Print the Node.js version twice

1. Print the Node.js version:

   ```shell
   node --version
   ```
2. Print the npm version:

   ```shell
   npm --version
   ```
````

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Print the Node.js version twice

. Print the Node.js version:
+
[source,shell]
----
node --version
----
. Print the npm version:
+
[source,shell]
----
npm --version
----
```

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Print the Node.js version twice</title></head>
<body>
<h1>Print the Node.js version twice</h1>
<ol>
  <li>Print the Node.js version:
    <pre><code class="language-shell">node --version</code></pre></li>
  <li>Print the npm version:
    <pre><code class="language-shell">npm --version</code></pre></li>
</ol>
</body>
</html>
```

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Print the Node.js version twice
===============================

#. Print the Node.js version:

   .. code-block:: shell

      node --version

#. Print the npm version:

   .. code-block:: shell

      npm --version
```

#### DITA

**`prose.dita`**

```xml title="prose.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="data-route-onpass-retry">
  <title>Print the Node.js version twice</title>
  <taskbody>
    <steps>
      <step><cmd>Print the Node.js version:</cmd>
        <info><codeblock outputclass="language-shell">node --version</codeblock></info></step>
      <step><cmd>Print the npm version:</cmd>
        <info><codeblock outputclass="language-shell">npm --version</codeblock></info></step>
    </steps>
  </taskbody>
</task>
```

#### Detected

#### Markdown

**`detected.md`**

````markdown title="detected.md"
<!-- test {"testId":"data-route-onpass-retry","detectSteps":true} -->

# Print the Node.js version twice

1. Print the Node.js version:

   ```shell
   node --version
   ```
   <!-- step {"runShell":"node --version","onPass":[{"retry":{"limit":1}}]} -->
2. Print the npm version:

   ```shell
   npm --version
   ```
   <!-- step {"stepId":"npm","runShell":"npm --version"} -->

<!-- test end -->
````

#### MDX

**`detected.mdx`**

````mdx title="detected.mdx"
{/* test {"testId":"data-route-onpass-retry","detectSteps":true} */}

# Print the Node.js version twice

1. Print the Node.js version:

   ```shell
   node --version
   ```
   {/* step {"runShell":"node --version","onPass":[{"retry":{"limit":1}}]} */}
2. Print the npm version:

   ```shell
   npm --version
   ```
   {/* step {"stepId":"npm","runShell":"npm --version"} */}

{/* test end */}
````

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Print the Node.js version twice

// (test {"testId":"data-route-onpass-retry","detectSteps":true})

. Print the Node.js version:
+
[source,shell]
----
node --version
----
+
// (step {"runShell":"node --version","onPass":[{"retry":{"limit":1}}]})
. Print the npm version:
+
[source,shell]
----
npm --version
----
+
// (step {"stepId":"npm","runShell":"npm --version"})

// (test end)
```

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Print the Node.js version twice</title></head>
<body>
<!-- test {"testId":"data-route-onpass-retry","detectSteps":true} -->
<h1>Print the Node.js version twice</h1>
<ol>
  <li>Print the Node.js version:
    <pre><code class="language-shell">node --version</code></pre>
    <!-- step {"runShell":"node --version","onPass":[{"retry":{"limit":1}}]} --></li>
  <li>Print the npm version:
    <pre><code class="language-shell">npm --version</code></pre>
    <!-- step {"stepId":"npm","runShell":"npm --version"} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Print the Node.js version twice
===============================

.. test {"testId":"data-route-onpass-retry","detectSteps":true}

#. Print the Node.js version:

   .. code-block:: shell

      node --version

   .. step {"runShell":"node --version","onPass":[{"retry":{"limit":1}}]}

#. Print the npm version:

   .. code-block:: shell

      npm --version

   .. step {"stepId":"npm","runShell":"npm --version"}

.. test end
```

#### DITA

**`detected.dita`**

```xml title="detected.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="data-route-onpass-retry">
  <title>Print the Node.js version twice</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"data-route-onpass-retry","detectSteps":true}'/>
    <steps>
      <step><cmd>Print the Node.js version:</cmd>
        <info><codeblock outputclass="language-shell">node --version</codeblock>
          <data name="doc-detective" value='step {"runShell":"node --version","onPass":[{"retry":{"limit":1}}]}'/></info></step>
      <step><cmd>Print the npm version:</cmd>
        <info><codeblock outputclass="language-shell">npm --version</codeblock>
          <data name="doc-detective" value='step {"stepId":"npm","runShell":"npm --version"}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Inline

#### Markdown

**`inline.md`**

````markdown title="inline.md"
<!-- test {"testId":"data-route-onpass-retry","detectSteps":false} -->

# Print the Node.js version twice

1. Print the Node.js version:

   ```shell
   node --version
   ```
   <!-- step {"runShell":"node --version","onPass":[{"retry":{"limit":1}}]} -->
2. Print the npm version:

   ```shell
   npm --version
   ```
   <!-- step {"stepId":"npm","runShell":"npm --version"} -->

<!-- test end -->
````

#### MDX

**`inline.mdx`**

````mdx title="inline.mdx"
{/* test {"testId":"data-route-onpass-retry","detectSteps":false} */}

# Print the Node.js version twice

1. Print the Node.js version:

   ```shell
   node --version
   ```
   {/* step {"runShell":"node --version","onPass":[{"retry":{"limit":1}}]} */}
2. Print the npm version:

   ```shell
   npm --version
   ```
   {/* step {"stepId":"npm","runShell":"npm --version"} */}

{/* test end */}
````

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Print the Node.js version twice

// (test {"testId":"data-route-onpass-retry","detectSteps":false})

. Print the Node.js version:
+
[source,shell]
----
node --version
----
+
// (step {"runShell":"node --version","onPass":[{"retry":{"limit":1}}]})
. Print the npm version:
+
[source,shell]
----
npm --version
----
+
// (step {"stepId":"npm","runShell":"npm --version"})

// (test end)
```

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Print the Node.js version twice</title></head>
<body>
<!-- test {"testId":"data-route-onpass-retry","detectSteps":false} -->
<h1>Print the Node.js version twice</h1>
<ol>
  <li>Print the Node.js version:
    <pre><code class="language-shell">node --version</code></pre>
    <!-- step {"runShell":"node --version","onPass":[{"retry":{"limit":1}}]} --></li>
  <li>Print the npm version:
    <pre><code class="language-shell">npm --version</code></pre>
    <!-- step {"stepId":"npm","runShell":"npm --version"} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Print the Node.js version twice
===============================

.. test {"testId":"data-route-onpass-retry","detectSteps":false}

#. Print the Node.js version:

   .. code-block:: shell

      node --version

   .. step {"runShell":"node --version","onPass":[{"retry":{"limit":1}}]}

#. Print the npm version:

   .. code-block:: shell

      npm --version

   .. step {"stepId":"npm","runShell":"npm --version"}

.. test end
```

#### DITA

**`inline.dita`**

```xml title="inline.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="data-route-onpass-retry">
  <title>Print the Node.js version twice</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"data-route-onpass-retry","detectSteps":false}'/>
    <steps>
      <step><cmd>Print the Node.js version:</cmd>
        <info><codeblock outputclass="language-shell">node --version</codeblock>
          <data name="doc-detective" value='step {"runShell":"node --version","onPass":[{"retry":{"limit":1}}]}'/></info></step>
      <step><cmd>Print the npm version:</cmd>
        <info><codeblock outputclass="language-shell">npm --version</codeblock>
          <data name="doc-detective" value='step {"stepId":"npm","runShell":"npm --version"}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "data-route-onpass-retry",
      "steps": [
        {
          "runShell": "node --version",
          "onPass": [
            {
              "retry": {
                "limit": 1
              }
            }
          ]
        },
        {
          "stepId": "npm",
          "runShell": "npm --version"
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: data-route-onpass-retry
    steps:
      - runShell: node --version
        onPass:
          - retry:
              limit: 1
      - stepId: npm
        runShell: npm --version
```

### `onFail`, `continue`

**Varies:** `step.onFail` · **Value:** `[{"continue": true}]` · **Effect:** applies only if the step fails: the next step still runs, but the test fails. Here the step passes.

#### Prose

#### Markdown

**`prose.md`**

````markdown title="prose.md"
# Print tool versions even if one fails

1. Print the Node.js version:

   ```shell
   node --version
   ```
2. Print the npm version:

   ```shell
   npm --version
   ```
````

#### MDX

**`prose.mdx`**

````mdx title="prose.mdx"
# Print tool versions even if one fails

1. Print the Node.js version:

   ```shell
   node --version
   ```
2. Print the npm version:

   ```shell
   npm --version
   ```
````

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Print tool versions even if one fails

. Print the Node.js version:
+
[source,shell]
----
node --version
----
. Print the npm version:
+
[source,shell]
----
npm --version
----
```

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Print tool versions even if one fails</title></head>
<body>
<h1>Print tool versions even if one fails</h1>
<ol>
  <li>Print the Node.js version:
    <pre><code class="language-shell">node --version</code></pre></li>
  <li>Print the npm version:
    <pre><code class="language-shell">npm --version</code></pre></li>
</ol>
</body>
</html>
```

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Print tool versions even if one fails
=====================================

#. Print the Node.js version:

   .. code-block:: shell

      node --version

#. Print the npm version:

   .. code-block:: shell

      npm --version
```

#### DITA

**`prose.dita`**

```xml title="prose.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="data-route-onfail-continue">
  <title>Print tool versions even if one fails</title>
  <taskbody>
    <steps>
      <step><cmd>Print the Node.js version:</cmd>
        <info><codeblock outputclass="language-shell">node --version</codeblock></info></step>
      <step><cmd>Print the npm version:</cmd>
        <info><codeblock outputclass="language-shell">npm --version</codeblock></info></step>
    </steps>
  </taskbody>
</task>
```

#### Detected

#### Markdown

**`detected.md`**

````markdown title="detected.md"
<!-- test {"testId":"data-route-onfail-continue","detectSteps":true} -->

# Print tool versions even if one fails

1. Print the Node.js version:

   ```shell
   node --version
   ```
   <!-- step {"runShell":"node --version","onFail":[{"continue":true}]} -->
2. Print the npm version:

   ```shell
   npm --version
   ```
   <!-- step {"stepId":"npm","runShell":"npm --version"} -->

<!-- test end -->
````

#### MDX

**`detected.mdx`**

````mdx title="detected.mdx"
{/* test {"testId":"data-route-onfail-continue","detectSteps":true} */}

# Print tool versions even if one fails

1. Print the Node.js version:

   ```shell
   node --version
   ```
   {/* step {"runShell":"node --version","onFail":[{"continue":true}]} */}
2. Print the npm version:

   ```shell
   npm --version
   ```
   {/* step {"stepId":"npm","runShell":"npm --version"} */}

{/* test end */}
````

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Print tool versions even if one fails

// (test {"testId":"data-route-onfail-continue","detectSteps":true})

. Print the Node.js version:
+
[source,shell]
----
node --version
----
+
// (step {"runShell":"node --version","onFail":[{"continue":true}]})
. Print the npm version:
+
[source,shell]
----
npm --version
----
+
// (step {"stepId":"npm","runShell":"npm --version"})

// (test end)
```

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Print tool versions even if one fails</title></head>
<body>
<!-- test {"testId":"data-route-onfail-continue","detectSteps":true} -->
<h1>Print tool versions even if one fails</h1>
<ol>
  <li>Print the Node.js version:
    <pre><code class="language-shell">node --version</code></pre>
    <!-- step {"runShell":"node --version","onFail":[{"continue":true}]} --></li>
  <li>Print the npm version:
    <pre><code class="language-shell">npm --version</code></pre>
    <!-- step {"stepId":"npm","runShell":"npm --version"} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Print tool versions even if one fails
=====================================

.. test {"testId":"data-route-onfail-continue","detectSteps":true}

#. Print the Node.js version:

   .. code-block:: shell

      node --version

   .. step {"runShell":"node --version","onFail":[{"continue":true}]}

#. Print the npm version:

   .. code-block:: shell

      npm --version

   .. step {"stepId":"npm","runShell":"npm --version"}

.. test end
```

#### DITA

**`detected.dita`**

```xml title="detected.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="data-route-onfail-continue">
  <title>Print tool versions even if one fails</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"data-route-onfail-continue","detectSteps":true}'/>
    <steps>
      <step><cmd>Print the Node.js version:</cmd>
        <info><codeblock outputclass="language-shell">node --version</codeblock>
          <data name="doc-detective" value='step {"runShell":"node --version","onFail":[{"continue":true}]}'/></info></step>
      <step><cmd>Print the npm version:</cmd>
        <info><codeblock outputclass="language-shell">npm --version</codeblock>
          <data name="doc-detective" value='step {"stepId":"npm","runShell":"npm --version"}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Inline

#### Markdown

**`inline.md`**

````markdown title="inline.md"
<!-- test {"testId":"data-route-onfail-continue","detectSteps":false} -->

# Print tool versions even if one fails

1. Print the Node.js version:

   ```shell
   node --version
   ```
   <!-- step {"runShell":"node --version","onFail":[{"continue":true}]} -->
2. Print the npm version:

   ```shell
   npm --version
   ```
   <!-- step {"stepId":"npm","runShell":"npm --version"} -->

<!-- test end -->
````

#### MDX

**`inline.mdx`**

````mdx title="inline.mdx"
{/* test {"testId":"data-route-onfail-continue","detectSteps":false} */}

# Print tool versions even if one fails

1. Print the Node.js version:

   ```shell
   node --version
   ```
   {/* step {"runShell":"node --version","onFail":[{"continue":true}]} */}
2. Print the npm version:

   ```shell
   npm --version
   ```
   {/* step {"stepId":"npm","runShell":"npm --version"} */}

{/* test end */}
````

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Print tool versions even if one fails

// (test {"testId":"data-route-onfail-continue","detectSteps":false})

. Print the Node.js version:
+
[source,shell]
----
node --version
----
+
// (step {"runShell":"node --version","onFail":[{"continue":true}]})
. Print the npm version:
+
[source,shell]
----
npm --version
----
+
// (step {"stepId":"npm","runShell":"npm --version"})

// (test end)
```

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Print tool versions even if one fails</title></head>
<body>
<!-- test {"testId":"data-route-onfail-continue","detectSteps":false} -->
<h1>Print tool versions even if one fails</h1>
<ol>
  <li>Print the Node.js version:
    <pre><code class="language-shell">node --version</code></pre>
    <!-- step {"runShell":"node --version","onFail":[{"continue":true}]} --></li>
  <li>Print the npm version:
    <pre><code class="language-shell">npm --version</code></pre>
    <!-- step {"stepId":"npm","runShell":"npm --version"} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Print tool versions even if one fails
=====================================

.. test {"testId":"data-route-onfail-continue","detectSteps":false}

#. Print the Node.js version:

   .. code-block:: shell

      node --version

   .. step {"runShell":"node --version","onFail":[{"continue":true}]}

#. Print the npm version:

   .. code-block:: shell

      npm --version

   .. step {"stepId":"npm","runShell":"npm --version"}

.. test end
```

#### DITA

**`inline.dita`**

```xml title="inline.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="data-route-onfail-continue">
  <title>Print tool versions even if one fails</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"data-route-onfail-continue","detectSteps":false}'/>
    <steps>
      <step><cmd>Print the Node.js version:</cmd>
        <info><codeblock outputclass="language-shell">node --version</codeblock>
          <data name="doc-detective" value='step {"runShell":"node --version","onFail":[{"continue":true}]}'/></info></step>
      <step><cmd>Print the npm version:</cmd>
        <info><codeblock outputclass="language-shell">npm --version</codeblock>
          <data name="doc-detective" value='step {"stepId":"npm","runShell":"npm --version"}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "data-route-onfail-continue",
      "steps": [
        {
          "runShell": "node --version",
          "onFail": [
            {
              "continue": true
            }
          ]
        },
        {
          "stepId": "npm",
          "runShell": "npm --version"
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: data-route-onfail-continue
    steps:
      - runShell: node --version
        onFail:
          - continue: true
      - stepId: npm
        runShell: npm --version
```

### `onFail`, `stop`

**Varies:** `step.onFail` · **Value:** `[{"stop": "test"}]` · **Effect:** applies only if the step fails, and stops the test's remaining steps. That's also the default. Here the step passes.

#### Prose

#### Markdown

**`prose.md`**

````markdown title="prose.md"
# Stop when Node.js is missing

1. Print the Node.js version:

   ```shell
   node --version
   ```
2. Print the npm version:

   ```shell
   npm --version
   ```
````

#### MDX

**`prose.mdx`**

````mdx title="prose.mdx"
# Stop when Node.js is missing

1. Print the Node.js version:

   ```shell
   node --version
   ```
2. Print the npm version:

   ```shell
   npm --version
   ```
````

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Stop when Node.js is missing

. Print the Node.js version:
+
[source,shell]
----
node --version
----
. Print the npm version:
+
[source,shell]
----
npm --version
----
```

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Stop when Node.js is missing</title></head>
<body>
<h1>Stop when Node.js is missing</h1>
<ol>
  <li>Print the Node.js version:
    <pre><code class="language-shell">node --version</code></pre></li>
  <li>Print the npm version:
    <pre><code class="language-shell">npm --version</code></pre></li>
</ol>
</body>
</html>
```

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Stop when Node.js is missing
============================

#. Print the Node.js version:

   .. code-block:: shell

      node --version

#. Print the npm version:

   .. code-block:: shell

      npm --version
```

#### DITA

**`prose.dita`**

```xml title="prose.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="data-route-onfail-stop">
  <title>Stop when Node.js is missing</title>
  <taskbody>
    <steps>
      <step><cmd>Print the Node.js version:</cmd>
        <info><codeblock outputclass="language-shell">node --version</codeblock></info></step>
      <step><cmd>Print the npm version:</cmd>
        <info><codeblock outputclass="language-shell">npm --version</codeblock></info></step>
    </steps>
  </taskbody>
</task>
```

#### Detected

#### Markdown

**`detected.md`**

````markdown title="detected.md"
<!-- test {"testId":"data-route-onfail-stop","detectSteps":true} -->

# Stop when Node.js is missing

1. Print the Node.js version:

   ```shell
   node --version
   ```
   <!-- step {"runShell":"node --version","onFail":[{"stop":"test"}]} -->
2. Print the npm version:

   ```shell
   npm --version
   ```
   <!-- step {"stepId":"npm","runShell":"npm --version"} -->

<!-- test end -->
````

#### MDX

**`detected.mdx`**

````mdx title="detected.mdx"
{/* test {"testId":"data-route-onfail-stop","detectSteps":true} */}

# Stop when Node.js is missing

1. Print the Node.js version:

   ```shell
   node --version
   ```
   {/* step {"runShell":"node --version","onFail":[{"stop":"test"}]} */}
2. Print the npm version:

   ```shell
   npm --version
   ```
   {/* step {"stepId":"npm","runShell":"npm --version"} */}

{/* test end */}
````

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Stop when Node.js is missing

// (test {"testId":"data-route-onfail-stop","detectSteps":true})

. Print the Node.js version:
+
[source,shell]
----
node --version
----
+
// (step {"runShell":"node --version","onFail":[{"stop":"test"}]})
. Print the npm version:
+
[source,shell]
----
npm --version
----
+
// (step {"stepId":"npm","runShell":"npm --version"})

// (test end)
```

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Stop when Node.js is missing</title></head>
<body>
<!-- test {"testId":"data-route-onfail-stop","detectSteps":true} -->
<h1>Stop when Node.js is missing</h1>
<ol>
  <li>Print the Node.js version:
    <pre><code class="language-shell">node --version</code></pre>
    <!-- step {"runShell":"node --version","onFail":[{"stop":"test"}]} --></li>
  <li>Print the npm version:
    <pre><code class="language-shell">npm --version</code></pre>
    <!-- step {"stepId":"npm","runShell":"npm --version"} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Stop when Node.js is missing
============================

.. test {"testId":"data-route-onfail-stop","detectSteps":true}

#. Print the Node.js version:

   .. code-block:: shell

      node --version

   .. step {"runShell":"node --version","onFail":[{"stop":"test"}]}

#. Print the npm version:

   .. code-block:: shell

      npm --version

   .. step {"stepId":"npm","runShell":"npm --version"}

.. test end
```

#### DITA

**`detected.dita`**

```xml title="detected.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="data-route-onfail-stop">
  <title>Stop when Node.js is missing</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"data-route-onfail-stop","detectSteps":true}'/>
    <steps>
      <step><cmd>Print the Node.js version:</cmd>
        <info><codeblock outputclass="language-shell">node --version</codeblock>
          <data name="doc-detective" value='step {"runShell":"node --version","onFail":[{"stop":"test"}]}'/></info></step>
      <step><cmd>Print the npm version:</cmd>
        <info><codeblock outputclass="language-shell">npm --version</codeblock>
          <data name="doc-detective" value='step {"stepId":"npm","runShell":"npm --version"}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Inline

#### Markdown

**`inline.md`**

````markdown title="inline.md"
<!-- test {"testId":"data-route-onfail-stop","detectSteps":false} -->

# Stop when Node.js is missing

1. Print the Node.js version:

   ```shell
   node --version
   ```
   <!-- step {"runShell":"node --version","onFail":[{"stop":"test"}]} -->
2. Print the npm version:

   ```shell
   npm --version
   ```
   <!-- step {"stepId":"npm","runShell":"npm --version"} -->

<!-- test end -->
````

#### MDX

**`inline.mdx`**

````mdx title="inline.mdx"
{/* test {"testId":"data-route-onfail-stop","detectSteps":false} */}

# Stop when Node.js is missing

1. Print the Node.js version:

   ```shell
   node --version
   ```
   {/* step {"runShell":"node --version","onFail":[{"stop":"test"}]} */}
2. Print the npm version:

   ```shell
   npm --version
   ```
   {/* step {"stepId":"npm","runShell":"npm --version"} */}

{/* test end */}
````

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Stop when Node.js is missing

// (test {"testId":"data-route-onfail-stop","detectSteps":false})

. Print the Node.js version:
+
[source,shell]
----
node --version
----
+
// (step {"runShell":"node --version","onFail":[{"stop":"test"}]})
. Print the npm version:
+
[source,shell]
----
npm --version
----
+
// (step {"stepId":"npm","runShell":"npm --version"})

// (test end)
```

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Stop when Node.js is missing</title></head>
<body>
<!-- test {"testId":"data-route-onfail-stop","detectSteps":false} -->
<h1>Stop when Node.js is missing</h1>
<ol>
  <li>Print the Node.js version:
    <pre><code class="language-shell">node --version</code></pre>
    <!-- step {"runShell":"node --version","onFail":[{"stop":"test"}]} --></li>
  <li>Print the npm version:
    <pre><code class="language-shell">npm --version</code></pre>
    <!-- step {"stepId":"npm","runShell":"npm --version"} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Stop when Node.js is missing
============================

.. test {"testId":"data-route-onfail-stop","detectSteps":false}

#. Print the Node.js version:

   .. code-block:: shell

      node --version

   .. step {"runShell":"node --version","onFail":[{"stop":"test"}]}

#. Print the npm version:

   .. code-block:: shell

      npm --version

   .. step {"stepId":"npm","runShell":"npm --version"}

.. test end
```

#### DITA

**`inline.dita`**

```xml title="inline.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="data-route-onfail-stop">
  <title>Stop when Node.js is missing</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"data-route-onfail-stop","detectSteps":false}'/>
    <steps>
      <step><cmd>Print the Node.js version:</cmd>
        <info><codeblock outputclass="language-shell">node --version</codeblock>
          <data name="doc-detective" value='step {"runShell":"node --version","onFail":[{"stop":"test"}]}'/></info></step>
      <step><cmd>Print the npm version:</cmd>
        <info><codeblock outputclass="language-shell">npm --version</codeblock>
          <data name="doc-detective" value='step {"stepId":"npm","runShell":"npm --version"}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "data-route-onfail-stop",
      "steps": [
        {
          "runShell": "node --version",
          "onFail": [
            {
              "stop": "test"
            }
          ]
        },
        {
          "stepId": "npm",
          "runShell": "npm --version"
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: data-route-onfail-stop
    steps:
      - runShell: node --version
        onFail:
          - stop: test
      - stepId: npm
        runShell: npm --version
```

### `onFail`, `goToStep`

**Varies:** `step.onFail` · **Value:** `[{"goToStep": "path"}]` · **Effect:** applies only if the step fails, and jumps to `path`. The failure still fails the test. Here the step passes.

#### Prose

#### Markdown

**`prose.md`**

````markdown title="prose.md"
# Find Node.js if the version check fails

1. Print the Node.js version:

   ```shell
   node --version
   ```
2. Print the npm version:

   ```shell
   npm --version
   ```
3. Find the Node.js executable:

   ```shell
   command -v node
   ```
````

#### MDX

**`prose.mdx`**

````mdx title="prose.mdx"
# Find Node.js if the version check fails

1. Print the Node.js version:

   ```shell
   node --version
   ```
2. Print the npm version:

   ```shell
   npm --version
   ```
3. Find the Node.js executable:

   ```shell
   command -v node
   ```
````

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Find Node.js if the version check fails

. Print the Node.js version:
+
[source,shell]
----
node --version
----
. Print the npm version:
+
[source,shell]
----
npm --version
----
. Find the Node.js executable:
+
[source,shell]
----
command -v node
----
```

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Find Node.js if the version check fails</title></head>
<body>
<h1>Find Node.js if the version check fails</h1>
<ol>
  <li>Print the Node.js version:
    <pre><code class="language-shell">node --version</code></pre></li>
  <li>Print the npm version:
    <pre><code class="language-shell">npm --version</code></pre></li>
  <li>Find the Node.js executable:
    <pre><code class="language-shell">command -v node</code></pre></li>
</ol>
</body>
</html>
```

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Find Node.js if the version check fails
=======================================

#. Print the Node.js version:

   .. code-block:: shell

      node --version

#. Print the npm version:

   .. code-block:: shell

      npm --version

#. Find the Node.js executable:

   .. code-block:: shell

      command -v node
```

#### DITA

**`prose.dita`**

```xml title="prose.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="data-route-onfail-gotostep">
  <title>Find Node.js if the version check fails</title>
  <taskbody>
    <steps>
      <step><cmd>Print the Node.js version:</cmd>
        <info><codeblock outputclass="language-shell">node --version</codeblock></info></step>
      <step><cmd>Print the npm version:</cmd>
        <info><codeblock outputclass="language-shell">npm --version</codeblock></info></step>
      <step><cmd>Find the Node.js executable:</cmd>
        <info><codeblock outputclass="language-shell">command -v node</codeblock></info></step>
    </steps>
  </taskbody>
</task>
```

#### Detected

#### Markdown

**`detected.md`**

````markdown title="detected.md"
<!-- test {"testId":"data-route-onfail-gotostep","detectSteps":true} -->

# Find Node.js if the version check fails

1. Print the Node.js version:

   ```shell
   node --version
   ```
   <!-- step {"runShell":"node --version","onFail":[{"goToStep":"path"}]} -->
2. Print the npm version:

   ```shell
   npm --version
   ```
   <!-- step {"stepId":"npm","runShell":"npm --version"} -->
3. Find the Node.js executable:

   ```shell
   command -v node
   ```
   <!-- step {"stepId":"path","runShell":"command -v node"} -->

<!-- test end -->
````

#### MDX

**`detected.mdx`**

````mdx title="detected.mdx"
{/* test {"testId":"data-route-onfail-gotostep","detectSteps":true} */}

# Find Node.js if the version check fails

1. Print the Node.js version:

   ```shell
   node --version
   ```
   {/* step {"runShell":"node --version","onFail":[{"goToStep":"path"}]} */}
2. Print the npm version:

   ```shell
   npm --version
   ```
   {/* step {"stepId":"npm","runShell":"npm --version"} */}
3. Find the Node.js executable:

   ```shell
   command -v node
   ```
   {/* step {"stepId":"path","runShell":"command -v node"} */}

{/* test end */}
````

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Find Node.js if the version check fails

// (test {"testId":"data-route-onfail-gotostep","detectSteps":true})

. Print the Node.js version:
+
[source,shell]
----
node --version
----
+
// (step {"runShell":"node --version","onFail":[{"goToStep":"path"}]})
. Print the npm version:
+
[source,shell]
----
npm --version
----
+
// (step {"stepId":"npm","runShell":"npm --version"})
. Find the Node.js executable:
+
[source,shell]
----
command -v node
----
+
// (step {"stepId":"path","runShell":"command -v node"})

// (test end)
```

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Find Node.js if the version check fails</title></head>
<body>
<!-- test {"testId":"data-route-onfail-gotostep","detectSteps":true} -->
<h1>Find Node.js if the version check fails</h1>
<ol>
  <li>Print the Node.js version:
    <pre><code class="language-shell">node --version</code></pre>
    <!-- step {"runShell":"node --version","onFail":[{"goToStep":"path"}]} --></li>
  <li>Print the npm version:
    <pre><code class="language-shell">npm --version</code></pre>
    <!-- step {"stepId":"npm","runShell":"npm --version"} --></li>
  <li>Find the Node.js executable:
    <pre><code class="language-shell">command -v node</code></pre>
    <!-- step {"stepId":"path","runShell":"command -v node"} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Find Node.js if the version check fails
=======================================

.. test {"testId":"data-route-onfail-gotostep","detectSteps":true}

#. Print the Node.js version:

   .. code-block:: shell

      node --version

   .. step {"runShell":"node --version","onFail":[{"goToStep":"path"}]}

#. Print the npm version:

   .. code-block:: shell

      npm --version

   .. step {"stepId":"npm","runShell":"npm --version"}

#. Find the Node.js executable:

   .. code-block:: shell

      command -v node

   .. step {"stepId":"path","runShell":"command -v node"}

.. test end
```

#### DITA

**`detected.dita`**

```xml title="detected.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="data-route-onfail-gotostep">
  <title>Find Node.js if the version check fails</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"data-route-onfail-gotostep","detectSteps":true}'/>
    <steps>
      <step><cmd>Print the Node.js version:</cmd>
        <info><codeblock outputclass="language-shell">node --version</codeblock>
          <data name="doc-detective" value='step {"runShell":"node --version","onFail":[{"goToStep":"path"}]}'/></info></step>
      <step><cmd>Print the npm version:</cmd>
        <info><codeblock outputclass="language-shell">npm --version</codeblock>
          <data name="doc-detective" value='step {"stepId":"npm","runShell":"npm --version"}'/></info></step>
      <step><cmd>Find the Node.js executable:</cmd>
        <info><codeblock outputclass="language-shell">command -v node</codeblock>
          <data name="doc-detective" value='step {"stepId":"path","runShell":"command -v node"}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Inline

#### Markdown

**`inline.md`**

````markdown title="inline.md"
<!-- test {"testId":"data-route-onfail-gotostep","detectSteps":false} -->

# Find Node.js if the version check fails

1. Print the Node.js version:

   ```shell
   node --version
   ```
   <!-- step {"runShell":"node --version","onFail":[{"goToStep":"path"}]} -->
2. Print the npm version:

   ```shell
   npm --version
   ```
   <!-- step {"stepId":"npm","runShell":"npm --version"} -->
3. Find the Node.js executable:

   ```shell
   command -v node
   ```
   <!-- step {"stepId":"path","runShell":"command -v node"} -->

<!-- test end -->
````

#### MDX

**`inline.mdx`**

````mdx title="inline.mdx"
{/* test {"testId":"data-route-onfail-gotostep","detectSteps":false} */}

# Find Node.js if the version check fails

1. Print the Node.js version:

   ```shell
   node --version
   ```
   {/* step {"runShell":"node --version","onFail":[{"goToStep":"path"}]} */}
2. Print the npm version:

   ```shell
   npm --version
   ```
   {/* step {"stepId":"npm","runShell":"npm --version"} */}
3. Find the Node.js executable:

   ```shell
   command -v node
   ```
   {/* step {"stepId":"path","runShell":"command -v node"} */}

{/* test end */}
````

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Find Node.js if the version check fails

// (test {"testId":"data-route-onfail-gotostep","detectSteps":false})

. Print the Node.js version:
+
[source,shell]
----
node --version
----
+
// (step {"runShell":"node --version","onFail":[{"goToStep":"path"}]})
. Print the npm version:
+
[source,shell]
----
npm --version
----
+
// (step {"stepId":"npm","runShell":"npm --version"})
. Find the Node.js executable:
+
[source,shell]
----
command -v node
----
+
// (step {"stepId":"path","runShell":"command -v node"})

// (test end)
```

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Find Node.js if the version check fails</title></head>
<body>
<!-- test {"testId":"data-route-onfail-gotostep","detectSteps":false} -->
<h1>Find Node.js if the version check fails</h1>
<ol>
  <li>Print the Node.js version:
    <pre><code class="language-shell">node --version</code></pre>
    <!-- step {"runShell":"node --version","onFail":[{"goToStep":"path"}]} --></li>
  <li>Print the npm version:
    <pre><code class="language-shell">npm --version</code></pre>
    <!-- step {"stepId":"npm","runShell":"npm --version"} --></li>
  <li>Find the Node.js executable:
    <pre><code class="language-shell">command -v node</code></pre>
    <!-- step {"stepId":"path","runShell":"command -v node"} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Find Node.js if the version check fails
=======================================

.. test {"testId":"data-route-onfail-gotostep","detectSteps":false}

#. Print the Node.js version:

   .. code-block:: shell

      node --version

   .. step {"runShell":"node --version","onFail":[{"goToStep":"path"}]}

#. Print the npm version:

   .. code-block:: shell

      npm --version

   .. step {"stepId":"npm","runShell":"npm --version"}

#. Find the Node.js executable:

   .. code-block:: shell

      command -v node

   .. step {"stepId":"path","runShell":"command -v node"}

.. test end
```

#### DITA

**`inline.dita`**

```xml title="inline.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="data-route-onfail-gotostep">
  <title>Find Node.js if the version check fails</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"data-route-onfail-gotostep","detectSteps":false}'/>
    <steps>
      <step><cmd>Print the Node.js version:</cmd>
        <info><codeblock outputclass="language-shell">node --version</codeblock>
          <data name="doc-detective" value='step {"runShell":"node --version","onFail":[{"goToStep":"path"}]}'/></info></step>
      <step><cmd>Print the npm version:</cmd>
        <info><codeblock outputclass="language-shell">npm --version</codeblock>
          <data name="doc-detective" value='step {"stepId":"npm","runShell":"npm --version"}'/></info></step>
      <step><cmd>Find the Node.js executable:</cmd>
        <info><codeblock outputclass="language-shell">command -v node</codeblock>
          <data name="doc-detective" value='step {"stepId":"path","runShell":"command -v node"}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "data-route-onfail-gotostep",
      "steps": [
        {
          "runShell": "node --version",
          "onFail": [
            {
              "goToStep": "path"
            }
          ]
        },
        {
          "stepId": "npm",
          "runShell": "npm --version"
        },
        {
          "stepId": "path",
          "runShell": "command -v node"
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: data-route-onfail-gotostep
    steps:
      - runShell: node --version
        onFail:
          - goToStep: path
      - stepId: npm
        runShell: npm --version
      - stepId: path
        runShell: command -v node
```

### `onFail`, `retry` with `limit`

**Varies:** `step.onFail` · **Value:** `[{"retry": {"limit": 2}}]` · **Effect:** the check fails once, and the first retry passes, so the step and the test pass with `"attempts": 2`. Retries run with no delay.

#### Prose

#### Markdown

**`prose.md`**

````markdown title="prose.md"
# Wait for a service to be ready

1. Check that the service is ready. If the check fails, check again:

   ```shell
   node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-limit');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"
   ```
````

#### MDX

**`prose.mdx`**

````mdx title="prose.mdx"
# Wait for a service to be ready

1. Check that the service is ready. If the check fails, check again:

   ```shell
   node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-limit');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"
   ```
````

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Wait for a service to be ready

. Check that the service is ready. If the check fails, check again:
+
[source,shell]
----
node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-limit');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"
----
```

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Wait for a service to be ready</title></head>
<body>
<h1>Wait for a service to be ready</h1>
<ol>
  <li>Check that the service is ready. If the check fails, check again:
    <pre><code class="language-shell">node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-limit');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"</code></pre></li>
</ol>
</body>
</html>
```

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Wait for a service to be ready
==============================

#. Check that the service is ready. If the check fails, check again:

   .. code-block:: shell

      node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-limit');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"
```

#### DITA

**`prose.dita`**

```xml title="prose.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="data-route-onfail-retry-limit">
  <title>Wait for a service to be ready</title>
  <taskbody>
    <steps>
      <step><cmd>Check that the service is ready. If the check fails, check again:</cmd>
        <info><codeblock outputclass="language-shell">node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-limit');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"</codeblock></info></step>
    </steps>
  </taskbody>
</task>
```

#### Detected

#### Markdown

**`detected.md`**

````markdown title="detected.md"
<!-- test {"testId":"data-route-onfail-retry-limit","detectSteps":true} -->

# Wait for a service to be ready

1. Check that the service is ready. If the check fails, check again:

   ```shell
   node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-limit');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"
   ```
   <!-- step {"runShell":"node -e \"const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-limit');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}\"","onFail":[{"retry":{"limit":2}}]} -->

<!-- test end -->
````

#### MDX

**`detected.mdx`**

````mdx title="detected.mdx"
{/* test {"testId":"data-route-onfail-retry-limit","detectSteps":true} */}

# Wait for a service to be ready

1. Check that the service is ready. If the check fails, check again:

   ```shell
   node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-limit');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"
   ```
   {/* step {"runShell":"node -e \"const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-limit');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}\"","onFail":[{"retry":{"limit":2}}]} */}

{/* test end */}
````

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Wait for a service to be ready

// (test {"testId":"data-route-onfail-retry-limit","detectSteps":true})

. Check that the service is ready. If the check fails, check again:
+
[source,shell]
----
node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-limit');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"
----
+
// (step {"runShell":"node -e \"const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-limit');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}\"","onFail":[{"retry":{"limit":2}}]})

// (test end)
```

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Wait for a service to be ready</title></head>
<body>
<!-- test {"testId":"data-route-onfail-retry-limit","detectSteps":true} -->
<h1>Wait for a service to be ready</h1>
<ol>
  <li>Check that the service is ready. If the check fails, check again:
    <pre><code class="language-shell">node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-limit');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"</code></pre>
    <!-- step {"runShell":"node -e \"const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-limit');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}\"","onFail":[{"retry":{"limit":2}}]} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Wait for a service to be ready
==============================

.. test {"testId":"data-route-onfail-retry-limit","detectSteps":true}

#. Check that the service is ready. If the check fails, check again:

   .. code-block:: shell

      node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-limit');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"

   .. step {"runShell":"node -e \"const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-limit');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}\"","onFail":[{"retry":{"limit":2}}]}

.. test end
```

#### DITA

**`detected.dita`**

```xml title="detected.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="data-route-onfail-retry-limit">
  <title>Wait for a service to be ready</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"data-route-onfail-retry-limit","detectSteps":true}'/>
    <steps>
      <step><cmd>Check that the service is ready. If the check fails, check again:</cmd>
        <info><codeblock outputclass="language-shell">node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-limit');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"</codeblock>
          <data name="doc-detective" value='step {"runShell":"node -e \"const fs=require(&apos;fs&apos;),f=require(&apos;path&apos;).join(require(&apos;os&apos;).tmpdir(),&apos;dd-data-route-onfail-retry-limit&apos;);if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,&apos;&apos;);console.error(&apos;Not ready yet.&apos;);process.exit(1)}\"","onFail":[{"retry":{"limit":2}}]}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Inline

#### Markdown

**`inline.md`**

````markdown title="inline.md"
<!-- test {"testId":"data-route-onfail-retry-limit","detectSteps":false} -->

# Wait for a service to be ready

1. Check that the service is ready. If the check fails, check again:

   ```shell
   node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-limit');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"
   ```
   <!-- step {"runShell":"node -e \"const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-limit');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}\"","onFail":[{"retry":{"limit":2}}]} -->

<!-- test end -->
````

#### MDX

**`inline.mdx`**

````mdx title="inline.mdx"
{/* test {"testId":"data-route-onfail-retry-limit","detectSteps":false} */}

# Wait for a service to be ready

1. Check that the service is ready. If the check fails, check again:

   ```shell
   node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-limit');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"
   ```
   {/* step {"runShell":"node -e \"const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-limit');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}\"","onFail":[{"retry":{"limit":2}}]} */}

{/* test end */}
````

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Wait for a service to be ready

// (test {"testId":"data-route-onfail-retry-limit","detectSteps":false})

. Check that the service is ready. If the check fails, check again:
+
[source,shell]
----
node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-limit');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"
----
+
// (step {"runShell":"node -e \"const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-limit');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}\"","onFail":[{"retry":{"limit":2}}]})

// (test end)
```

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Wait for a service to be ready</title></head>
<body>
<!-- test {"testId":"data-route-onfail-retry-limit","detectSteps":false} -->
<h1>Wait for a service to be ready</h1>
<ol>
  <li>Check that the service is ready. If the check fails, check again:
    <pre><code class="language-shell">node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-limit');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"</code></pre>
    <!-- step {"runShell":"node -e \"const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-limit');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}\"","onFail":[{"retry":{"limit":2}}]} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Wait for a service to be ready
==============================

.. test {"testId":"data-route-onfail-retry-limit","detectSteps":false}

#. Check that the service is ready. If the check fails, check again:

   .. code-block:: shell

      node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-limit');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"

   .. step {"runShell":"node -e \"const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-limit');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}\"","onFail":[{"retry":{"limit":2}}]}

.. test end
```

#### DITA

**`inline.dita`**

```xml title="inline.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="data-route-onfail-retry-limit">
  <title>Wait for a service to be ready</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"data-route-onfail-retry-limit","detectSteps":false}'/>
    <steps>
      <step><cmd>Check that the service is ready. If the check fails, check again:</cmd>
        <info><codeblock outputclass="language-shell">node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-limit');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"</codeblock>
          <data name="doc-detective" value='step {"runShell":"node -e \"const fs=require(&apos;fs&apos;),f=require(&apos;path&apos;).join(require(&apos;os&apos;).tmpdir(),&apos;dd-data-route-onfail-retry-limit&apos;);if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,&apos;&apos;);console.error(&apos;Not ready yet.&apos;);process.exit(1)}\"","onFail":[{"retry":{"limit":2}}]}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "data-route-onfail-retry-limit",
      "steps": [
        {
          "runShell": "node -e \"const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-limit');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}\"",
          "onFail": [
            {
              "retry": {
                "limit": 2
              }
            }
          ]
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: data-route-onfail-retry-limit
    steps:
      - runShell: node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-limit');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"
        onFail:
          - retry:
              limit: 2
```

### `onFail`, `retry` with `delay`

**Varies:** `step.onFail` · **Value:** `[{"retry": {"limit": 2, "delay": 500}}]` · **Effect:** waits 500 milliseconds before each retry.

#### Prose

#### Markdown

**`prose.md`**

````markdown title="prose.md"
# Wait for a service to be ready

1. Check that the service is ready. If the check fails, check again:

   ```shell
   node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-delay');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"
   ```
````

#### MDX

**`prose.mdx`**

````mdx title="prose.mdx"
# Wait for a service to be ready

1. Check that the service is ready. If the check fails, check again:

   ```shell
   node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-delay');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"
   ```
````

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Wait for a service to be ready

. Check that the service is ready. If the check fails, check again:
+
[source,shell]
----
node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-delay');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"
----
```

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Wait for a service to be ready</title></head>
<body>
<h1>Wait for a service to be ready</h1>
<ol>
  <li>Check that the service is ready. If the check fails, check again:
    <pre><code class="language-shell">node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-delay');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"</code></pre></li>
</ol>
</body>
</html>
```

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Wait for a service to be ready
==============================

#. Check that the service is ready. If the check fails, check again:

   .. code-block:: shell

      node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-delay');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"
```

#### DITA

**`prose.dita`**

```xml title="prose.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="data-route-onfail-retry-delay">
  <title>Wait for a service to be ready</title>
  <taskbody>
    <steps>
      <step><cmd>Check that the service is ready. If the check fails, check again:</cmd>
        <info><codeblock outputclass="language-shell">node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-delay');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"</codeblock></info></step>
    </steps>
  </taskbody>
</task>
```

#### Detected

#### Markdown

**`detected.md`**

````markdown title="detected.md"
<!-- test {"testId":"data-route-onfail-retry-delay","detectSteps":true} -->

# Wait for a service to be ready

1. Check that the service is ready. If the check fails, check again:

   ```shell
   node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-delay');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"
   ```
   <!-- step {"runShell":"node -e \"const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-delay');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}\"","onFail":[{"retry":{"limit":2,"delay":500}}]} -->

<!-- test end -->
````

#### MDX

**`detected.mdx`**

````mdx title="detected.mdx"
{/* test {"testId":"data-route-onfail-retry-delay","detectSteps":true} */}

# Wait for a service to be ready

1. Check that the service is ready. If the check fails, check again:

   ```shell
   node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-delay');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"
   ```
   {/* step {"runShell":"node -e \"const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-delay');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}\"","onFail":[{"retry":{"limit":2,"delay":500}}]} */}

{/* test end */}
````

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Wait for a service to be ready

// (test {"testId":"data-route-onfail-retry-delay","detectSteps":true})

. Check that the service is ready. If the check fails, check again:
+
[source,shell]
----
node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-delay');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"
----
+
// (step {"runShell":"node -e \"const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-delay');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}\"","onFail":[{"retry":{"limit":2,"delay":500}}]})

// (test end)
```

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Wait for a service to be ready</title></head>
<body>
<!-- test {"testId":"data-route-onfail-retry-delay","detectSteps":true} -->
<h1>Wait for a service to be ready</h1>
<ol>
  <li>Check that the service is ready. If the check fails, check again:
    <pre><code class="language-shell">node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-delay');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"</code></pre>
    <!-- step {"runShell":"node -e \"const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-delay');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}\"","onFail":[{"retry":{"limit":2,"delay":500}}]} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Wait for a service to be ready
==============================

.. test {"testId":"data-route-onfail-retry-delay","detectSteps":true}

#. Check that the service is ready. If the check fails, check again:

   .. code-block:: shell

      node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-delay');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"

   .. step {"runShell":"node -e \"const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-delay');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}\"","onFail":[{"retry":{"limit":2,"delay":500}}]}

.. test end
```

#### DITA

**`detected.dita`**

```xml title="detected.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="data-route-onfail-retry-delay">
  <title>Wait for a service to be ready</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"data-route-onfail-retry-delay","detectSteps":true}'/>
    <steps>
      <step><cmd>Check that the service is ready. If the check fails, check again:</cmd>
        <info><codeblock outputclass="language-shell">node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-delay');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"</codeblock>
          <data name="doc-detective" value='step {"runShell":"node -e \"const fs=require(&apos;fs&apos;),f=require(&apos;path&apos;).join(require(&apos;os&apos;).tmpdir(),&apos;dd-data-route-onfail-retry-delay&apos;);if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,&apos;&apos;);console.error(&apos;Not ready yet.&apos;);process.exit(1)}\"","onFail":[{"retry":{"limit":2,"delay":500}}]}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Inline

#### Markdown

**`inline.md`**

````markdown title="inline.md"
<!-- test {"testId":"data-route-onfail-retry-delay","detectSteps":false} -->

# Wait for a service to be ready

1. Check that the service is ready. If the check fails, check again:

   ```shell
   node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-delay');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"
   ```
   <!-- step {"runShell":"node -e \"const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-delay');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}\"","onFail":[{"retry":{"limit":2,"delay":500}}]} -->

<!-- test end -->
````

#### MDX

**`inline.mdx`**

````mdx title="inline.mdx"
{/* test {"testId":"data-route-onfail-retry-delay","detectSteps":false} */}

# Wait for a service to be ready

1. Check that the service is ready. If the check fails, check again:

   ```shell
   node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-delay');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"
   ```
   {/* step {"runShell":"node -e \"const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-delay');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}\"","onFail":[{"retry":{"limit":2,"delay":500}}]} */}

{/* test end */}
````

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Wait for a service to be ready

// (test {"testId":"data-route-onfail-retry-delay","detectSteps":false})

. Check that the service is ready. If the check fails, check again:
+
[source,shell]
----
node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-delay');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"
----
+
// (step {"runShell":"node -e \"const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-delay');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}\"","onFail":[{"retry":{"limit":2,"delay":500}}]})

// (test end)
```

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Wait for a service to be ready</title></head>
<body>
<!-- test {"testId":"data-route-onfail-retry-delay","detectSteps":false} -->
<h1>Wait for a service to be ready</h1>
<ol>
  <li>Check that the service is ready. If the check fails, check again:
    <pre><code class="language-shell">node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-delay');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"</code></pre>
    <!-- step {"runShell":"node -e \"const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-delay');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}\"","onFail":[{"retry":{"limit":2,"delay":500}}]} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Wait for a service to be ready
==============================

.. test {"testId":"data-route-onfail-retry-delay","detectSteps":false}

#. Check that the service is ready. If the check fails, check again:

   .. code-block:: shell

      node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-delay');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"

   .. step {"runShell":"node -e \"const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-delay');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}\"","onFail":[{"retry":{"limit":2,"delay":500}}]}

.. test end
```

#### DITA

**`inline.dita`**

```xml title="inline.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="data-route-onfail-retry-delay">
  <title>Wait for a service to be ready</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"data-route-onfail-retry-delay","detectSteps":false}'/>
    <steps>
      <step><cmd>Check that the service is ready. If the check fails, check again:</cmd>
        <info><codeblock outputclass="language-shell">node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-delay');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"</codeblock>
          <data name="doc-detective" value='step {"runShell":"node -e \"const fs=require(&apos;fs&apos;),f=require(&apos;path&apos;).join(require(&apos;os&apos;).tmpdir(),&apos;dd-data-route-onfail-retry-delay&apos;);if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,&apos;&apos;);console.error(&apos;Not ready yet.&apos;);process.exit(1)}\"","onFail":[{"retry":{"limit":2,"delay":500}}]}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "data-route-onfail-retry-delay",
      "steps": [
        {
          "runShell": "node -e \"const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-delay');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}\"",
          "onFail": [
            {
              "retry": {
                "limit": 2,
                "delay": 500
              }
            }
          ]
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: data-route-onfail-retry-delay
    steps:
      - runShell: node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-delay');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"
        onFail:
          - retry:
              limit: 2
              delay: 500
```

### `onFail`, `retry` with `backoff: fixed`

**Varies:** `step.onFail` · **Value:** `[{"retry": {"limit": 3, "delay": 500, "backoff": "fixed"}}]` · **Effect:** waits the same 500 milliseconds before every retry. This is the default backoff.

#### Prose

#### Markdown

**`prose.md`**

````markdown title="prose.md"
# Wait for a service to be ready

1. Check that the service is ready. If the check fails, check again:

   ```shell
   node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-backoff-fixed');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"
   ```
````

#### MDX

**`prose.mdx`**

````mdx title="prose.mdx"
# Wait for a service to be ready

1. Check that the service is ready. If the check fails, check again:

   ```shell
   node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-backoff-fixed');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"
   ```
````

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Wait for a service to be ready

. Check that the service is ready. If the check fails, check again:
+
[source,shell]
----
node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-backoff-fixed');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"
----
```

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Wait for a service to be ready</title></head>
<body>
<h1>Wait for a service to be ready</h1>
<ol>
  <li>Check that the service is ready. If the check fails, check again:
    <pre><code class="language-shell">node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-backoff-fixed');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"</code></pre></li>
</ol>
</body>
</html>
```

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Wait for a service to be ready
==============================

#. Check that the service is ready. If the check fails, check again:

   .. code-block:: shell

      node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-backoff-fixed');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"
```

#### DITA

**`prose.dita`**

```xml title="prose.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="data-route-onfail-retry-backoff-fixed">
  <title>Wait for a service to be ready</title>
  <taskbody>
    <steps>
      <step><cmd>Check that the service is ready. If the check fails, check again:</cmd>
        <info><codeblock outputclass="language-shell">node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-backoff-fixed');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"</codeblock></info></step>
    </steps>
  </taskbody>
</task>
```

#### Detected

#### Markdown

**`detected.md`**

````markdown title="detected.md"
<!-- test {"testId":"data-route-onfail-retry-backoff-fixed","detectSteps":true} -->

# Wait for a service to be ready

1. Check that the service is ready. If the check fails, check again:

   ```shell
   node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-backoff-fixed');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"
   ```
   <!-- step {"runShell":"node -e \"const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-backoff-fixed');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}\"","onFail":[{"retry":{"limit":3,"delay":500,"backoff":"fixed"}}]} -->

<!-- test end -->
````

#### MDX

**`detected.mdx`**

````mdx title="detected.mdx"
{/* test {"testId":"data-route-onfail-retry-backoff-fixed","detectSteps":true} */}

# Wait for a service to be ready

1. Check that the service is ready. If the check fails, check again:

   ```shell
   node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-backoff-fixed');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"
   ```
   {/* step {"runShell":"node -e \"const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-backoff-fixed');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}\"","onFail":[{"retry":{"limit":3,"delay":500,"backoff":"fixed"}}]} */}

{/* test end */}
````

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Wait for a service to be ready

// (test {"testId":"data-route-onfail-retry-backoff-fixed","detectSteps":true})

. Check that the service is ready. If the check fails, check again:
+
[source,shell]
----
node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-backoff-fixed');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"
----
+
// (step {"runShell":"node -e \"const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-backoff-fixed');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}\"","onFail":[{"retry":{"limit":3,"delay":500,"backoff":"fixed"}}]})

// (test end)
```

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Wait for a service to be ready</title></head>
<body>
<!-- test {"testId":"data-route-onfail-retry-backoff-fixed","detectSteps":true} -->
<h1>Wait for a service to be ready</h1>
<ol>
  <li>Check that the service is ready. If the check fails, check again:
    <pre><code class="language-shell">node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-backoff-fixed');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"</code></pre>
    <!-- step {"runShell":"node -e \"const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-backoff-fixed');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}\"","onFail":[{"retry":{"limit":3,"delay":500,"backoff":"fixed"}}]} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Wait for a service to be ready
==============================

.. test {"testId":"data-route-onfail-retry-backoff-fixed","detectSteps":true}

#. Check that the service is ready. If the check fails, check again:

   .. code-block:: shell

      node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-backoff-fixed');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"

   .. step {"runShell":"node -e \"const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-backoff-fixed');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}\"","onFail":[{"retry":{"limit":3,"delay":500,"backoff":"fixed"}}]}

.. test end
```

#### DITA

**`detected.dita`**

```xml title="detected.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="data-route-onfail-retry-backoff-fixed">
  <title>Wait for a service to be ready</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"data-route-onfail-retry-backoff-fixed","detectSteps":true}'/>
    <steps>
      <step><cmd>Check that the service is ready. If the check fails, check again:</cmd>
        <info><codeblock outputclass="language-shell">node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-backoff-fixed');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"</codeblock>
          <data name="doc-detective" value='step {"runShell":"node -e \"const fs=require(&apos;fs&apos;),f=require(&apos;path&apos;).join(require(&apos;os&apos;).tmpdir(),&apos;dd-data-route-onfail-retry-backoff-fixed&apos;);if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,&apos;&apos;);console.error(&apos;Not ready yet.&apos;);process.exit(1)}\"","onFail":[{"retry":{"limit":3,"delay":500,"backoff":"fixed"}}]}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Inline

#### Markdown

**`inline.md`**

````markdown title="inline.md"
<!-- test {"testId":"data-route-onfail-retry-backoff-fixed","detectSteps":false} -->

# Wait for a service to be ready

1. Check that the service is ready. If the check fails, check again:

   ```shell
   node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-backoff-fixed');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"
   ```
   <!-- step {"runShell":"node -e \"const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-backoff-fixed');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}\"","onFail":[{"retry":{"limit":3,"delay":500,"backoff":"fixed"}}]} -->

<!-- test end -->
````

#### MDX

**`inline.mdx`**

````mdx title="inline.mdx"
{/* test {"testId":"data-route-onfail-retry-backoff-fixed","detectSteps":false} */}

# Wait for a service to be ready

1. Check that the service is ready. If the check fails, check again:

   ```shell
   node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-backoff-fixed');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"
   ```
   {/* step {"runShell":"node -e \"const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-backoff-fixed');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}\"","onFail":[{"retry":{"limit":3,"delay":500,"backoff":"fixed"}}]} */}

{/* test end */}
````

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Wait for a service to be ready

// (test {"testId":"data-route-onfail-retry-backoff-fixed","detectSteps":false})

. Check that the service is ready. If the check fails, check again:
+
[source,shell]
----
node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-backoff-fixed');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"
----
+
// (step {"runShell":"node -e \"const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-backoff-fixed');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}\"","onFail":[{"retry":{"limit":3,"delay":500,"backoff":"fixed"}}]})

// (test end)
```

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Wait for a service to be ready</title></head>
<body>
<!-- test {"testId":"data-route-onfail-retry-backoff-fixed","detectSteps":false} -->
<h1>Wait for a service to be ready</h1>
<ol>
  <li>Check that the service is ready. If the check fails, check again:
    <pre><code class="language-shell">node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-backoff-fixed');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"</code></pre>
    <!-- step {"runShell":"node -e \"const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-backoff-fixed');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}\"","onFail":[{"retry":{"limit":3,"delay":500,"backoff":"fixed"}}]} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Wait for a service to be ready
==============================

.. test {"testId":"data-route-onfail-retry-backoff-fixed","detectSteps":false}

#. Check that the service is ready. If the check fails, check again:

   .. code-block:: shell

      node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-backoff-fixed');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"

   .. step {"runShell":"node -e \"const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-backoff-fixed');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}\"","onFail":[{"retry":{"limit":3,"delay":500,"backoff":"fixed"}}]}

.. test end
```

#### DITA

**`inline.dita`**

```xml title="inline.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="data-route-onfail-retry-backoff-fixed">
  <title>Wait for a service to be ready</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"data-route-onfail-retry-backoff-fixed","detectSteps":false}'/>
    <steps>
      <step><cmd>Check that the service is ready. If the check fails, check again:</cmd>
        <info><codeblock outputclass="language-shell">node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-backoff-fixed');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"</codeblock>
          <data name="doc-detective" value='step {"runShell":"node -e \"const fs=require(&apos;fs&apos;),f=require(&apos;path&apos;).join(require(&apos;os&apos;).tmpdir(),&apos;dd-data-route-onfail-retry-backoff-fixed&apos;);if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,&apos;&apos;);console.error(&apos;Not ready yet.&apos;);process.exit(1)}\"","onFail":[{"retry":{"limit":3,"delay":500,"backoff":"fixed"}}]}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "data-route-onfail-retry-backoff-fixed",
      "steps": [
        {
          "runShell": "node -e \"const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-backoff-fixed');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}\"",
          "onFail": [
            {
              "retry": {
                "limit": 3,
                "delay": 500,
                "backoff": "fixed"
              }
            }
          ]
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: data-route-onfail-retry-backoff-fixed
    steps:
      - runShell: node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-backoff-fixed');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"
        onFail:
          - retry:
              limit: 3
              delay: 500
              backoff: fixed
```

### `onFail`, `retry` with `backoff: exponential`

**Varies:** `step.onFail` · **Value:** `[{"retry": {"limit": 3, "delay": 500, "backoff": "exponential"}}]` · **Effect:** doubles the wait before each retry: 500, then 1000, then 2000 milliseconds.

#### Prose

#### Markdown

**`prose.md`**

````markdown title="prose.md"
# Wait for a service to be ready

1. Check that the service is ready. If the check fails, check again:

   ```shell
   node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-backoff-exponential');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"
   ```
````

#### MDX

**`prose.mdx`**

````mdx title="prose.mdx"
# Wait for a service to be ready

1. Check that the service is ready. If the check fails, check again:

   ```shell
   node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-backoff-exponential');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"
   ```
````

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Wait for a service to be ready

. Check that the service is ready. If the check fails, check again:
+
[source,shell]
----
node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-backoff-exponential');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"
----
```

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Wait for a service to be ready</title></head>
<body>
<h1>Wait for a service to be ready</h1>
<ol>
  <li>Check that the service is ready. If the check fails, check again:
    <pre><code class="language-shell">node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-backoff-exponential');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"</code></pre></li>
</ol>
</body>
</html>
```

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Wait for a service to be ready
==============================

#. Check that the service is ready. If the check fails, check again:

   .. code-block:: shell

      node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-backoff-exponential');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"
```

#### DITA

**`prose.dita`**

```xml title="prose.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="data-route-onfail-retry-backoff-exponential">
  <title>Wait for a service to be ready</title>
  <taskbody>
    <steps>
      <step><cmd>Check that the service is ready. If the check fails, check again:</cmd>
        <info><codeblock outputclass="language-shell">node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-backoff-exponential');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"</codeblock></info></step>
    </steps>
  </taskbody>
</task>
```

#### Detected

#### Markdown

**`detected.md`**

````markdown title="detected.md"
<!-- test {"testId":"data-route-onfail-retry-backoff-exponential","detectSteps":true} -->

# Wait for a service to be ready

1. Check that the service is ready. If the check fails, check again:

   ```shell
   node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-backoff-exponential');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"
   ```
   <!-- step {"runShell":"node -e \"const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-backoff-exponential');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}\"","onFail":[{"retry":{"limit":3,"delay":500,"backoff":"exponential"}}]} -->

<!-- test end -->
````

#### MDX

**`detected.mdx`**

````mdx title="detected.mdx"
{/* test {"testId":"data-route-onfail-retry-backoff-exponential","detectSteps":true} */}

# Wait for a service to be ready

1. Check that the service is ready. If the check fails, check again:

   ```shell
   node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-backoff-exponential');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"
   ```
   {/* step {"runShell":"node -e \"const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-backoff-exponential');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}\"","onFail":[{"retry":{"limit":3,"delay":500,"backoff":"exponential"}}]} */}

{/* test end */}
````

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Wait for a service to be ready

// (test {"testId":"data-route-onfail-retry-backoff-exponential","detectSteps":true})

. Check that the service is ready. If the check fails, check again:
+
[source,shell]
----
node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-backoff-exponential');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"
----
+
// (step {"runShell":"node -e \"const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-backoff-exponential');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}\"","onFail":[{"retry":{"limit":3,"delay":500,"backoff":"exponential"}}]})

// (test end)
```

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Wait for a service to be ready</title></head>
<body>
<!-- test {"testId":"data-route-onfail-retry-backoff-exponential","detectSteps":true} -->
<h1>Wait for a service to be ready</h1>
<ol>
  <li>Check that the service is ready. If the check fails, check again:
    <pre><code class="language-shell">node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-backoff-exponential');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"</code></pre>
    <!-- step {"runShell":"node -e \"const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-backoff-exponential');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}\"","onFail":[{"retry":{"limit":3,"delay":500,"backoff":"exponential"}}]} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Wait for a service to be ready
==============================

.. test {"testId":"data-route-onfail-retry-backoff-exponential","detectSteps":true}

#. Check that the service is ready. If the check fails, check again:

   .. code-block:: shell

      node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-backoff-exponential');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"

   .. step {"runShell":"node -e \"const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-backoff-exponential');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}\"","onFail":[{"retry":{"limit":3,"delay":500,"backoff":"exponential"}}]}

.. test end
```

#### DITA

**`detected.dita`**

```xml title="detected.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="data-route-onfail-retry-backoff-exponential">
  <title>Wait for a service to be ready</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"data-route-onfail-retry-backoff-exponential","detectSteps":true}'/>
    <steps>
      <step><cmd>Check that the service is ready. If the check fails, check again:</cmd>
        <info><codeblock outputclass="language-shell">node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-backoff-exponential');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"</codeblock>
          <data name="doc-detective" value='step {"runShell":"node -e \"const fs=require(&apos;fs&apos;),f=require(&apos;path&apos;).join(require(&apos;os&apos;).tmpdir(),&apos;dd-data-route-onfail-retry-backoff-exponential&apos;);if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,&apos;&apos;);console.error(&apos;Not ready yet.&apos;);process.exit(1)}\"","onFail":[{"retry":{"limit":3,"delay":500,"backoff":"exponential"}}]}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Inline

#### Markdown

**`inline.md`**

````markdown title="inline.md"
<!-- test {"testId":"data-route-onfail-retry-backoff-exponential","detectSteps":false} -->

# Wait for a service to be ready

1. Check that the service is ready. If the check fails, check again:

   ```shell
   node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-backoff-exponential');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"
   ```
   <!-- step {"runShell":"node -e \"const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-backoff-exponential');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}\"","onFail":[{"retry":{"limit":3,"delay":500,"backoff":"exponential"}}]} -->

<!-- test end -->
````

#### MDX

**`inline.mdx`**

````mdx title="inline.mdx"
{/* test {"testId":"data-route-onfail-retry-backoff-exponential","detectSteps":false} */}

# Wait for a service to be ready

1. Check that the service is ready. If the check fails, check again:

   ```shell
   node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-backoff-exponential');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"
   ```
   {/* step {"runShell":"node -e \"const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-backoff-exponential');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}\"","onFail":[{"retry":{"limit":3,"delay":500,"backoff":"exponential"}}]} */}

{/* test end */}
````

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Wait for a service to be ready

// (test {"testId":"data-route-onfail-retry-backoff-exponential","detectSteps":false})

. Check that the service is ready. If the check fails, check again:
+
[source,shell]
----
node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-backoff-exponential');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"
----
+
// (step {"runShell":"node -e \"const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-backoff-exponential');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}\"","onFail":[{"retry":{"limit":3,"delay":500,"backoff":"exponential"}}]})

// (test end)
```

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Wait for a service to be ready</title></head>
<body>
<!-- test {"testId":"data-route-onfail-retry-backoff-exponential","detectSteps":false} -->
<h1>Wait for a service to be ready</h1>
<ol>
  <li>Check that the service is ready. If the check fails, check again:
    <pre><code class="language-shell">node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-backoff-exponential');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"</code></pre>
    <!-- step {"runShell":"node -e \"const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-backoff-exponential');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}\"","onFail":[{"retry":{"limit":3,"delay":500,"backoff":"exponential"}}]} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Wait for a service to be ready
==============================

.. test {"testId":"data-route-onfail-retry-backoff-exponential","detectSteps":false}

#. Check that the service is ready. If the check fails, check again:

   .. code-block:: shell

      node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-backoff-exponential');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"

   .. step {"runShell":"node -e \"const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-backoff-exponential');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}\"","onFail":[{"retry":{"limit":3,"delay":500,"backoff":"exponential"}}]}

.. test end
```

#### DITA

**`inline.dita`**

```xml title="inline.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="data-route-onfail-retry-backoff-exponential">
  <title>Wait for a service to be ready</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"data-route-onfail-retry-backoff-exponential","detectSteps":false}'/>
    <steps>
      <step><cmd>Check that the service is ready. If the check fails, check again:</cmd>
        <info><codeblock outputclass="language-shell">node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-backoff-exponential');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"</codeblock>
          <data name="doc-detective" value='step {"runShell":"node -e \"const fs=require(&apos;fs&apos;),f=require(&apos;path&apos;).join(require(&apos;os&apos;).tmpdir(),&apos;dd-data-route-onfail-retry-backoff-exponential&apos;);if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,&apos;&apos;);console.error(&apos;Not ready yet.&apos;);process.exit(1)}\"","onFail":[{"retry":{"limit":3,"delay":500,"backoff":"exponential"}}]}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "data-route-onfail-retry-backoff-exponential",
      "steps": [
        {
          "runShell": "node -e \"const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-backoff-exponential');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}\"",
          "onFail": [
            {
              "retry": {
                "limit": 3,
                "delay": 500,
                "backoff": "exponential"
              }
            }
          ]
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: data-route-onfail-retry-backoff-exponential
    steps:
      - runShell: node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-backoff-exponential');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"
        onFail:
          - retry:
              limit: 3
              delay: 500
              backoff: exponential
```

### `onFail`, `retry` then `continue`

**Varies:** `step.onFail` · **Value:** `[{"retry": {"limit": 2}}, {"continue": true}]` · **Effect:** retries first. If the step still fails after its retries, the next entry applies and the test moves on. Here the first retry passes.

#### Prose

#### Markdown

**`prose.md`**

````markdown title="prose.md"
# Wait for a service, then move on

1. Check that the service is ready. If the check fails, check again:

   ```shell
   node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-then-continue');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"
   ```
2. Print the npm version:

   ```shell
   npm --version
   ```
````

#### MDX

**`prose.mdx`**

````mdx title="prose.mdx"
# Wait for a service, then move on

1. Check that the service is ready. If the check fails, check again:

   ```shell
   node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-then-continue');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"
   ```
2. Print the npm version:

   ```shell
   npm --version
   ```
````

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Wait for a service, then move on

. Check that the service is ready. If the check fails, check again:
+
[source,shell]
----
node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-then-continue');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"
----
. Print the npm version:
+
[source,shell]
----
npm --version
----
```

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Wait for a service, then move on</title></head>
<body>
<h1>Wait for a service, then move on</h1>
<ol>
  <li>Check that the service is ready. If the check fails, check again:
    <pre><code class="language-shell">node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-then-continue');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"</code></pre></li>
  <li>Print the npm version:
    <pre><code class="language-shell">npm --version</code></pre></li>
</ol>
</body>
</html>
```

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Wait for a service, then move on
================================

#. Check that the service is ready. If the check fails, check again:

   .. code-block:: shell

      node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-then-continue');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"

#. Print the npm version:

   .. code-block:: shell

      npm --version
```

#### DITA

**`prose.dita`**

```xml title="prose.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="data-route-onfail-retry-then-continue">
  <title>Wait for a service, then move on</title>
  <taskbody>
    <steps>
      <step><cmd>Check that the service is ready. If the check fails, check again:</cmd>
        <info><codeblock outputclass="language-shell">node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-then-continue');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"</codeblock></info></step>
      <step><cmd>Print the npm version:</cmd>
        <info><codeblock outputclass="language-shell">npm --version</codeblock></info></step>
    </steps>
  </taskbody>
</task>
```

#### Detected

#### Markdown

**`detected.md`**

````markdown title="detected.md"
<!-- test {"testId":"data-route-onfail-retry-then-continue","detectSteps":true} -->

# Wait for a service, then move on

1. Check that the service is ready. If the check fails, check again:

   ```shell
   node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-then-continue');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"
   ```
   <!-- step {"runShell":"node -e \"const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-then-continue');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}\"","onFail":[{"retry":{"limit":2}},{"continue":true}]} -->
2. Print the npm version:

   ```shell
   npm --version
   ```
   <!-- step {"stepId":"npm","runShell":"npm --version"} -->

<!-- test end -->
````

#### MDX

**`detected.mdx`**

````mdx title="detected.mdx"
{/* test {"testId":"data-route-onfail-retry-then-continue","detectSteps":true} */}

# Wait for a service, then move on

1. Check that the service is ready. If the check fails, check again:

   ```shell
   node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-then-continue');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"
   ```
   {/* step {"runShell":"node -e \"const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-then-continue');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}\"","onFail":[{"retry":{"limit":2}},{"continue":true}]} */}
2. Print the npm version:

   ```shell
   npm --version
   ```
   {/* step {"stepId":"npm","runShell":"npm --version"} */}

{/* test end */}
````

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Wait for a service, then move on

// (test {"testId":"data-route-onfail-retry-then-continue","detectSteps":true})

. Check that the service is ready. If the check fails, check again:
+
[source,shell]
----
node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-then-continue');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"
----
+
// (step {"runShell":"node -e \"const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-then-continue');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}\"","onFail":[{"retry":{"limit":2}},{"continue":true}]})
. Print the npm version:
+
[source,shell]
----
npm --version
----
+
// (step {"stepId":"npm","runShell":"npm --version"})

// (test end)
```

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Wait for a service, then move on</title></head>
<body>
<!-- test {"testId":"data-route-onfail-retry-then-continue","detectSteps":true} -->
<h1>Wait for a service, then move on</h1>
<ol>
  <li>Check that the service is ready. If the check fails, check again:
    <pre><code class="language-shell">node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-then-continue');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"</code></pre>
    <!-- step {"runShell":"node -e \"const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-then-continue');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}\"","onFail":[{"retry":{"limit":2}},{"continue":true}]} --></li>
  <li>Print the npm version:
    <pre><code class="language-shell">npm --version</code></pre>
    <!-- step {"stepId":"npm","runShell":"npm --version"} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Wait for a service, then move on
================================

.. test {"testId":"data-route-onfail-retry-then-continue","detectSteps":true}

#. Check that the service is ready. If the check fails, check again:

   .. code-block:: shell

      node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-then-continue');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"

   .. step {"runShell":"node -e \"const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-then-continue');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}\"","onFail":[{"retry":{"limit":2}},{"continue":true}]}

#. Print the npm version:

   .. code-block:: shell

      npm --version

   .. step {"stepId":"npm","runShell":"npm --version"}

.. test end
```

#### DITA

**`detected.dita`**

```xml title="detected.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="data-route-onfail-retry-then-continue">
  <title>Wait for a service, then move on</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"data-route-onfail-retry-then-continue","detectSteps":true}'/>
    <steps>
      <step><cmd>Check that the service is ready. If the check fails, check again:</cmd>
        <info><codeblock outputclass="language-shell">node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-then-continue');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"</codeblock>
          <data name="doc-detective" value='step {"runShell":"node -e \"const fs=require(&apos;fs&apos;),f=require(&apos;path&apos;).join(require(&apos;os&apos;).tmpdir(),&apos;dd-data-route-onfail-retry-then-continue&apos;);if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,&apos;&apos;);console.error(&apos;Not ready yet.&apos;);process.exit(1)}\"","onFail":[{"retry":{"limit":2}},{"continue":true}]}'/></info></step>
      <step><cmd>Print the npm version:</cmd>
        <info><codeblock outputclass="language-shell">npm --version</codeblock>
          <data name="doc-detective" value='step {"stepId":"npm","runShell":"npm --version"}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Inline

#### Markdown

**`inline.md`**

````markdown title="inline.md"
<!-- test {"testId":"data-route-onfail-retry-then-continue","detectSteps":false} -->

# Wait for a service, then move on

1. Check that the service is ready. If the check fails, check again:

   ```shell
   node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-then-continue');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"
   ```
   <!-- step {"runShell":"node -e \"const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-then-continue');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}\"","onFail":[{"retry":{"limit":2}},{"continue":true}]} -->
2. Print the npm version:

   ```shell
   npm --version
   ```
   <!-- step {"stepId":"npm","runShell":"npm --version"} -->

<!-- test end -->
````

#### MDX

**`inline.mdx`**

````mdx title="inline.mdx"
{/* test {"testId":"data-route-onfail-retry-then-continue","detectSteps":false} */}

# Wait for a service, then move on

1. Check that the service is ready. If the check fails, check again:

   ```shell
   node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-then-continue');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"
   ```
   {/* step {"runShell":"node -e \"const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-then-continue');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}\"","onFail":[{"retry":{"limit":2}},{"continue":true}]} */}
2. Print the npm version:

   ```shell
   npm --version
   ```
   {/* step {"stepId":"npm","runShell":"npm --version"} */}

{/* test end */}
````

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Wait for a service, then move on

// (test {"testId":"data-route-onfail-retry-then-continue","detectSteps":false})

. Check that the service is ready. If the check fails, check again:
+
[source,shell]
----
node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-then-continue');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"
----
+
// (step {"runShell":"node -e \"const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-then-continue');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}\"","onFail":[{"retry":{"limit":2}},{"continue":true}]})
. Print the npm version:
+
[source,shell]
----
npm --version
----
+
// (step {"stepId":"npm","runShell":"npm --version"})

// (test end)
```

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Wait for a service, then move on</title></head>
<body>
<!-- test {"testId":"data-route-onfail-retry-then-continue","detectSteps":false} -->
<h1>Wait for a service, then move on</h1>
<ol>
  <li>Check that the service is ready. If the check fails, check again:
    <pre><code class="language-shell">node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-then-continue');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"</code></pre>
    <!-- step {"runShell":"node -e \"const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-then-continue');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}\"","onFail":[{"retry":{"limit":2}},{"continue":true}]} --></li>
  <li>Print the npm version:
    <pre><code class="language-shell">npm --version</code></pre>
    <!-- step {"stepId":"npm","runShell":"npm --version"} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Wait for a service, then move on
================================

.. test {"testId":"data-route-onfail-retry-then-continue","detectSteps":false}

#. Check that the service is ready. If the check fails, check again:

   .. code-block:: shell

      node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-then-continue');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"

   .. step {"runShell":"node -e \"const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-then-continue');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}\"","onFail":[{"retry":{"limit":2}},{"continue":true}]}

#. Print the npm version:

   .. code-block:: shell

      npm --version

   .. step {"stepId":"npm","runShell":"npm --version"}

.. test end
```

#### DITA

**`inline.dita`**

```xml title="inline.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="data-route-onfail-retry-then-continue">
  <title>Wait for a service, then move on</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"data-route-onfail-retry-then-continue","detectSteps":false}'/>
    <steps>
      <step><cmd>Check that the service is ready. If the check fails, check again:</cmd>
        <info><codeblock outputclass="language-shell">node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-then-continue');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"</codeblock>
          <data name="doc-detective" value='step {"runShell":"node -e \"const fs=require(&apos;fs&apos;),f=require(&apos;path&apos;).join(require(&apos;os&apos;).tmpdir(),&apos;dd-data-route-onfail-retry-then-continue&apos;);if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,&apos;&apos;);console.error(&apos;Not ready yet.&apos;);process.exit(1)}\"","onFail":[{"retry":{"limit":2}},{"continue":true}]}'/></info></step>
      <step><cmd>Print the npm version:</cmd>
        <info><codeblock outputclass="language-shell">npm --version</codeblock>
          <data name="doc-detective" value='step {"stepId":"npm","runShell":"npm --version"}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "data-route-onfail-retry-then-continue",
      "steps": [
        {
          "runShell": "node -e \"const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-then-continue');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}\"",
          "onFail": [
            {
              "retry": {
                "limit": 2
              }
            },
            {
              "continue": true
            }
          ]
        },
        {
          "stepId": "npm",
          "runShell": "npm --version"
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: data-route-onfail-retry-then-continue
    steps:
      - runShell: node -e "const fs=require('fs'),f=require('path').join(require('os').tmpdir(),'dd-data-route-onfail-retry-then-continue');if(fs.existsSync(f)){fs.rmSync(f)}else{fs.writeFileSync(f,'');console.error('Not ready yet.');process.exit(1)}"
        onFail:
          - retry:
              limit: 2
          - continue: true
      - stepId: npm
        runShell: npm --version
```

### `onSkip`, `continue`

**Varies:** `step.onSkip` · **Value:** `[{"continue": true}]` · **Effect:** the help step's `if` is false, so it's skipped, and the test moves on. This is the default after a skip.

#### Prose

#### Markdown

**`prose.md`**

````markdown title="prose.md"
# Show help only when Node.js fails

1. Print the Node.js version:

   ```shell
   node --version
   ```
2. If that failed, print the help for `node`:

   ```shell
   node --help
   ```
3. Print the npm version:

   ```shell
   npm --version
   ```
````

#### MDX

**`prose.mdx`**

````mdx title="prose.mdx"
# Show help only when Node.js fails

1. Print the Node.js version:

   ```shell
   node --version
   ```
2. If that failed, print the help for `node`:

   ```shell
   node --help
   ```
3. Print the npm version:

   ```shell
   npm --version
   ```
````

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Show help only when Node.js fails

. Print the Node.js version:
+
[source,shell]
----
node --version
----
. If that failed, print the help for `+node+`:
+
[source,shell]
----
node --help
----
. Print the npm version:
+
[source,shell]
----
npm --version
----
```

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Show help only when Node.js fails</title></head>
<body>
<h1>Show help only when Node.js fails</h1>
<ol>
  <li>Print the Node.js version:
    <pre><code class="language-shell">node --version</code></pre></li>
  <li>If that failed, print the help for <code>node</code>:
    <pre><code class="language-shell">node --help</code></pre></li>
  <li>Print the npm version:
    <pre><code class="language-shell">npm --version</code></pre></li>
</ol>
</body>
</html>
```

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Show help only when Node.js fails
=================================

#. Print the Node.js version:

   .. code-block:: shell

      node --version

#. If that failed, print the help for ``node``:

   .. code-block:: shell

      node --help

#. Print the npm version:

   .. code-block:: shell

      npm --version
```

#### DITA

**`prose.dita`**

```xml title="prose.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="data-route-onskip-continue">
  <title>Show help only when Node.js fails</title>
  <taskbody>
    <steps>
      <step><cmd>Print the Node.js version:</cmd>
        <info><codeblock outputclass="language-shell">node --version</codeblock></info></step>
      <step><cmd>If that failed, print the help for <codeph>node</codeph>:</cmd>
        <info><codeblock outputclass="language-shell">node --help</codeblock></info></step>
      <step><cmd>Print the npm version:</cmd>
        <info><codeblock outputclass="language-shell">npm --version</codeblock></info></step>
    </steps>
  </taskbody>
</task>
```

#### Detected

#### Markdown

**`detected.md`**

````markdown title="detected.md"
<!-- test {"testId":"data-route-onskip-continue","detectSteps":true} -->

# Show help only when Node.js fails

1. Print the Node.js version:

   ```shell
   node --version
   ```
   <!-- step {"runShell":"node --version","stepId":"version"} -->
2. If that failed, print the help for `node`:

   ```shell
   node --help
   ```
   <!-- step {"if":"$$steps.version.outputs.exitCode != 0","runShell":"node --help","onSkip":[{"continue":true}]} -->
3. Print the npm version:

   ```shell
   npm --version
   ```
   <!-- step {"stepId":"npm","runShell":"npm --version"} -->

<!-- test end -->
````

#### MDX

**`detected.mdx`**

````mdx title="detected.mdx"
{/* test {"testId":"data-route-onskip-continue","detectSteps":true} */}

# Show help only when Node.js fails

1. Print the Node.js version:

   ```shell
   node --version
   ```
   {/* step {"runShell":"node --version","stepId":"version"} */}
2. If that failed, print the help for `node`:

   ```shell
   node --help
   ```
   {/* step {"if":"$$steps.version.outputs.exitCode != 0","runShell":"node --help","onSkip":[{"continue":true}]} */}
3. Print the npm version:

   ```shell
   npm --version
   ```
   {/* step {"stepId":"npm","runShell":"npm --version"} */}

{/* test end */}
````

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Show help only when Node.js fails

// (test {"testId":"data-route-onskip-continue","detectSteps":true})

. Print the Node.js version:
+
[source,shell]
----
node --version
----
+
// (step {"runShell":"node --version","stepId":"version"})
. If that failed, print the help for `+node+`:
+
[source,shell]
----
node --help
----
+
// (step {"if":"$$steps.version.outputs.exitCode != 0","runShell":"node --help","onSkip":[{"continue":true}]})
. Print the npm version:
+
[source,shell]
----
npm --version
----
+
// (step {"stepId":"npm","runShell":"npm --version"})

// (test end)
```

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Show help only when Node.js fails</title></head>
<body>
<!-- test {"testId":"data-route-onskip-continue","detectSteps":true} -->
<h1>Show help only when Node.js fails</h1>
<ol>
  <li>Print the Node.js version:
    <pre><code class="language-shell">node --version</code></pre>
    <!-- step {"runShell":"node --version","stepId":"version"} --></li>
  <li>If that failed, print the help for <code>node</code>:
    <pre><code class="language-shell">node --help</code></pre>
    <!-- step {"if":"$$steps.version.outputs.exitCode != 0","runShell":"node --help","onSkip":[{"continue":true}]} --></li>
  <li>Print the npm version:
    <pre><code class="language-shell">npm --version</code></pre>
    <!-- step {"stepId":"npm","runShell":"npm --version"} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Show help only when Node.js fails
=================================

.. test {"testId":"data-route-onskip-continue","detectSteps":true}

#. Print the Node.js version:

   .. code-block:: shell

      node --version

   .. step {"runShell":"node --version","stepId":"version"}

#. If that failed, print the help for ``node``:

   .. code-block:: shell

      node --help

   .. step {"if":"$$steps.version.outputs.exitCode != 0","runShell":"node --help","onSkip":[{"continue":true}]}

#. Print the npm version:

   .. code-block:: shell

      npm --version

   .. step {"stepId":"npm","runShell":"npm --version"}

.. test end
```

#### DITA

**`detected.dita`**

```xml title="detected.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="data-route-onskip-continue">
  <title>Show help only when Node.js fails</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"data-route-onskip-continue","detectSteps":true}'/>
    <steps>
      <step><cmd>Print the Node.js version:</cmd>
        <info><codeblock outputclass="language-shell">node --version</codeblock>
          <data name="doc-detective" value='step {"runShell":"node --version","stepId":"version"}'/></info></step>
      <step><cmd>If that failed, print the help for <codeph>node</codeph>:</cmd>
        <info><codeblock outputclass="language-shell">node --help</codeblock>
          <data name="doc-detective" value='step {"if":"$$steps.version.outputs.exitCode != 0","runShell":"node --help","onSkip":[{"continue":true}]}'/></info></step>
      <step><cmd>Print the npm version:</cmd>
        <info><codeblock outputclass="language-shell">npm --version</codeblock>
          <data name="doc-detective" value='step {"stepId":"npm","runShell":"npm --version"}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Inline

#### Markdown

**`inline.md`**

````markdown title="inline.md"
<!-- test {"testId":"data-route-onskip-continue","detectSteps":false} -->

# Show help only when Node.js fails

1. Print the Node.js version:

   ```shell
   node --version
   ```
   <!-- step {"runShell":"node --version","stepId":"version"} -->
2. If that failed, print the help for `node`:

   ```shell
   node --help
   ```
   <!-- step {"if":"$$steps.version.outputs.exitCode != 0","runShell":"node --help","onSkip":[{"continue":true}]} -->
3. Print the npm version:

   ```shell
   npm --version
   ```
   <!-- step {"stepId":"npm","runShell":"npm --version"} -->

<!-- test end -->
````

#### MDX

**`inline.mdx`**

````mdx title="inline.mdx"
{/* test {"testId":"data-route-onskip-continue","detectSteps":false} */}

# Show help only when Node.js fails

1. Print the Node.js version:

   ```shell
   node --version
   ```
   {/* step {"runShell":"node --version","stepId":"version"} */}
2. If that failed, print the help for `node`:

   ```shell
   node --help
   ```
   {/* step {"if":"$$steps.version.outputs.exitCode != 0","runShell":"node --help","onSkip":[{"continue":true}]} */}
3. Print the npm version:

   ```shell
   npm --version
   ```
   {/* step {"stepId":"npm","runShell":"npm --version"} */}

{/* test end */}
````

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Show help only when Node.js fails

// (test {"testId":"data-route-onskip-continue","detectSteps":false})

. Print the Node.js version:
+
[source,shell]
----
node --version
----
+
// (step {"runShell":"node --version","stepId":"version"})
. If that failed, print the help for `+node+`:
+
[source,shell]
----
node --help
----
+
// (step {"if":"$$steps.version.outputs.exitCode != 0","runShell":"node --help","onSkip":[{"continue":true}]})
. Print the npm version:
+
[source,shell]
----
npm --version
----
+
// (step {"stepId":"npm","runShell":"npm --version"})

// (test end)
```

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Show help only when Node.js fails</title></head>
<body>
<!-- test {"testId":"data-route-onskip-continue","detectSteps":false} -->
<h1>Show help only when Node.js fails</h1>
<ol>
  <li>Print the Node.js version:
    <pre><code class="language-shell">node --version</code></pre>
    <!-- step {"runShell":"node --version","stepId":"version"} --></li>
  <li>If that failed, print the help for <code>node</code>:
    <pre><code class="language-shell">node --help</code></pre>
    <!-- step {"if":"$$steps.version.outputs.exitCode != 0","runShell":"node --help","onSkip":[{"continue":true}]} --></li>
  <li>Print the npm version:
    <pre><code class="language-shell">npm --version</code></pre>
    <!-- step {"stepId":"npm","runShell":"npm --version"} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Show help only when Node.js fails
=================================

.. test {"testId":"data-route-onskip-continue","detectSteps":false}

#. Print the Node.js version:

   .. code-block:: shell

      node --version

   .. step {"runShell":"node --version","stepId":"version"}

#. If that failed, print the help for ``node``:

   .. code-block:: shell

      node --help

   .. step {"if":"$$steps.version.outputs.exitCode != 0","runShell":"node --help","onSkip":[{"continue":true}]}

#. Print the npm version:

   .. code-block:: shell

      npm --version

   .. step {"stepId":"npm","runShell":"npm --version"}

.. test end
```

#### DITA

**`inline.dita`**

```xml title="inline.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="data-route-onskip-continue">
  <title>Show help only when Node.js fails</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"data-route-onskip-continue","detectSteps":false}'/>
    <steps>
      <step><cmd>Print the Node.js version:</cmd>
        <info><codeblock outputclass="language-shell">node --version</codeblock>
          <data name="doc-detective" value='step {"runShell":"node --version","stepId":"version"}'/></info></step>
      <step><cmd>If that failed, print the help for <codeph>node</codeph>:</cmd>
        <info><codeblock outputclass="language-shell">node --help</codeblock>
          <data name="doc-detective" value='step {"if":"$$steps.version.outputs.exitCode != 0","runShell":"node --help","onSkip":[{"continue":true}]}'/></info></step>
      <step><cmd>Print the npm version:</cmd>
        <info><codeblock outputclass="language-shell">npm --version</codeblock>
          <data name="doc-detective" value='step {"stepId":"npm","runShell":"npm --version"}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "data-route-onskip-continue",
      "steps": [
        {
          "runShell": "node --version",
          "stepId": "version"
        },
        {
          "if": "$$steps.version.outputs.exitCode != 0",
          "runShell": "node --help",
          "onSkip": [
            {
              "continue": true
            }
          ]
        },
        {
          "stepId": "npm",
          "runShell": "npm --version"
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: data-route-onskip-continue
    steps:
      - runShell: node --version
        stepId: version
      - if: $$steps.version.outputs.exitCode != 0
        runShell: node --help
        onSkip:
          - continue: true
      - stepId: npm
        runShell: npm --version
```

### `onSkip`, `stop`

**Varies:** `step.onSkip` · **Value:** `[{"stop": "test"}]` · **Effect:** the help step is skipped, so the test stops. The npm step is skipped too, and the test passes.

#### Prose

#### Markdown

**`prose.md`**

````markdown title="prose.md"
# Stop when the help step is skipped

1. Print the Node.js version:

   ```shell
   node --version
   ```
2. If that failed, print the help for `node`:

   ```shell
   node --help
   ```
3. Print the npm version:

   ```shell
   npm --version
   ```
````

#### MDX

**`prose.mdx`**

````mdx title="prose.mdx"
# Stop when the help step is skipped

1. Print the Node.js version:

   ```shell
   node --version
   ```
2. If that failed, print the help for `node`:

   ```shell
   node --help
   ```
3. Print the npm version:

   ```shell
   npm --version
   ```
````

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Stop when the help step is skipped

. Print the Node.js version:
+
[source,shell]
----
node --version
----
. If that failed, print the help for `+node+`:
+
[source,shell]
----
node --help
----
. Print the npm version:
+
[source,shell]
----
npm --version
----
```

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Stop when the help step is skipped</title></head>
<body>
<h1>Stop when the help step is skipped</h1>
<ol>
  <li>Print the Node.js version:
    <pre><code class="language-shell">node --version</code></pre></li>
  <li>If that failed, print the help for <code>node</code>:
    <pre><code class="language-shell">node --help</code></pre></li>
  <li>Print the npm version:
    <pre><code class="language-shell">npm --version</code></pre></li>
</ol>
</body>
</html>
```

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Stop when the help step is skipped
==================================

#. Print the Node.js version:

   .. code-block:: shell

      node --version

#. If that failed, print the help for ``node``:

   .. code-block:: shell

      node --help

#. Print the npm version:

   .. code-block:: shell

      npm --version
```

#### DITA

**`prose.dita`**

```xml title="prose.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="data-route-onskip-stop">
  <title>Stop when the help step is skipped</title>
  <taskbody>
    <steps>
      <step><cmd>Print the Node.js version:</cmd>
        <info><codeblock outputclass="language-shell">node --version</codeblock></info></step>
      <step><cmd>If that failed, print the help for <codeph>node</codeph>:</cmd>
        <info><codeblock outputclass="language-shell">node --help</codeblock></info></step>
      <step><cmd>Print the npm version:</cmd>
        <info><codeblock outputclass="language-shell">npm --version</codeblock></info></step>
    </steps>
  </taskbody>
</task>
```

#### Detected

#### Markdown

**`detected.md`**

````markdown title="detected.md"
<!-- test {"testId":"data-route-onskip-stop","detectSteps":true} -->

# Stop when the help step is skipped

1. Print the Node.js version:

   ```shell
   node --version
   ```
   <!-- step {"runShell":"node --version","stepId":"version"} -->
2. If that failed, print the help for `node`:

   ```shell
   node --help
   ```
   <!-- step {"if":"$$steps.version.outputs.exitCode != 0","runShell":"node --help","onSkip":[{"stop":"test"}]} -->
3. Print the npm version:

   ```shell
   npm --version
   ```
   <!-- step {"stepId":"npm","runShell":"npm --version"} -->

<!-- test end -->
````

#### MDX

**`detected.mdx`**

````mdx title="detected.mdx"
{/* test {"testId":"data-route-onskip-stop","detectSteps":true} */}

# Stop when the help step is skipped

1. Print the Node.js version:

   ```shell
   node --version
   ```
   {/* step {"runShell":"node --version","stepId":"version"} */}
2. If that failed, print the help for `node`:

   ```shell
   node --help
   ```
   {/* step {"if":"$$steps.version.outputs.exitCode != 0","runShell":"node --help","onSkip":[{"stop":"test"}]} */}
3. Print the npm version:

   ```shell
   npm --version
   ```
   {/* step {"stepId":"npm","runShell":"npm --version"} */}

{/* test end */}
````

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Stop when the help step is skipped

// (test {"testId":"data-route-onskip-stop","detectSteps":true})

. Print the Node.js version:
+
[source,shell]
----
node --version
----
+
// (step {"runShell":"node --version","stepId":"version"})
. If that failed, print the help for `+node+`:
+
[source,shell]
----
node --help
----
+
// (step {"if":"$$steps.version.outputs.exitCode != 0","runShell":"node --help","onSkip":[{"stop":"test"}]})
. Print the npm version:
+
[source,shell]
----
npm --version
----
+
// (step {"stepId":"npm","runShell":"npm --version"})

// (test end)
```

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Stop when the help step is skipped</title></head>
<body>
<!-- test {"testId":"data-route-onskip-stop","detectSteps":true} -->
<h1>Stop when the help step is skipped</h1>
<ol>
  <li>Print the Node.js version:
    <pre><code class="language-shell">node --version</code></pre>
    <!-- step {"runShell":"node --version","stepId":"version"} --></li>
  <li>If that failed, print the help for <code>node</code>:
    <pre><code class="language-shell">node --help</code></pre>
    <!-- step {"if":"$$steps.version.outputs.exitCode != 0","runShell":"node --help","onSkip":[{"stop":"test"}]} --></li>
  <li>Print the npm version:
    <pre><code class="language-shell">npm --version</code></pre>
    <!-- step {"stepId":"npm","runShell":"npm --version"} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Stop when the help step is skipped
==================================

.. test {"testId":"data-route-onskip-stop","detectSteps":true}

#. Print the Node.js version:

   .. code-block:: shell

      node --version

   .. step {"runShell":"node --version","stepId":"version"}

#. If that failed, print the help for ``node``:

   .. code-block:: shell

      node --help

   .. step {"if":"$$steps.version.outputs.exitCode != 0","runShell":"node --help","onSkip":[{"stop":"test"}]}

#. Print the npm version:

   .. code-block:: shell

      npm --version

   .. step {"stepId":"npm","runShell":"npm --version"}

.. test end
```

#### DITA

**`detected.dita`**

```xml title="detected.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="data-route-onskip-stop">
  <title>Stop when the help step is skipped</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"data-route-onskip-stop","detectSteps":true}'/>
    <steps>
      <step><cmd>Print the Node.js version:</cmd>
        <info><codeblock outputclass="language-shell">node --version</codeblock>
          <data name="doc-detective" value='step {"runShell":"node --version","stepId":"version"}'/></info></step>
      <step><cmd>If that failed, print the help for <codeph>node</codeph>:</cmd>
        <info><codeblock outputclass="language-shell">node --help</codeblock>
          <data name="doc-detective" value='step {"if":"$$steps.version.outputs.exitCode != 0","runShell":"node --help","onSkip":[{"stop":"test"}]}'/></info></step>
      <step><cmd>Print the npm version:</cmd>
        <info><codeblock outputclass="language-shell">npm --version</codeblock>
          <data name="doc-detective" value='step {"stepId":"npm","runShell":"npm --version"}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Inline

#### Markdown

**`inline.md`**

````markdown title="inline.md"
<!-- test {"testId":"data-route-onskip-stop","detectSteps":false} -->

# Stop when the help step is skipped

1. Print the Node.js version:

   ```shell
   node --version
   ```
   <!-- step {"runShell":"node --version","stepId":"version"} -->
2. If that failed, print the help for `node`:

   ```shell
   node --help
   ```
   <!-- step {"if":"$$steps.version.outputs.exitCode != 0","runShell":"node --help","onSkip":[{"stop":"test"}]} -->
3. Print the npm version:

   ```shell
   npm --version
   ```
   <!-- step {"stepId":"npm","runShell":"npm --version"} -->

<!-- test end -->
````

#### MDX

**`inline.mdx`**

````mdx title="inline.mdx"
{/* test {"testId":"data-route-onskip-stop","detectSteps":false} */}

# Stop when the help step is skipped

1. Print the Node.js version:

   ```shell
   node --version
   ```
   {/* step {"runShell":"node --version","stepId":"version"} */}
2. If that failed, print the help for `node`:

   ```shell
   node --help
   ```
   {/* step {"if":"$$steps.version.outputs.exitCode != 0","runShell":"node --help","onSkip":[{"stop":"test"}]} */}
3. Print the npm version:

   ```shell
   npm --version
   ```
   {/* step {"stepId":"npm","runShell":"npm --version"} */}

{/* test end */}
````

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Stop when the help step is skipped

// (test {"testId":"data-route-onskip-stop","detectSteps":false})

. Print the Node.js version:
+
[source,shell]
----
node --version
----
+
// (step {"runShell":"node --version","stepId":"version"})
. If that failed, print the help for `+node+`:
+
[source,shell]
----
node --help
----
+
// (step {"if":"$$steps.version.outputs.exitCode != 0","runShell":"node --help","onSkip":[{"stop":"test"}]})
. Print the npm version:
+
[source,shell]
----
npm --version
----
+
// (step {"stepId":"npm","runShell":"npm --version"})

// (test end)
```

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Stop when the help step is skipped</title></head>
<body>
<!-- test {"testId":"data-route-onskip-stop","detectSteps":false} -->
<h1>Stop when the help step is skipped</h1>
<ol>
  <li>Print the Node.js version:
    <pre><code class="language-shell">node --version</code></pre>
    <!-- step {"runShell":"node --version","stepId":"version"} --></li>
  <li>If that failed, print the help for <code>node</code>:
    <pre><code class="language-shell">node --help</code></pre>
    <!-- step {"if":"$$steps.version.outputs.exitCode != 0","runShell":"node --help","onSkip":[{"stop":"test"}]} --></li>
  <li>Print the npm version:
    <pre><code class="language-shell">npm --version</code></pre>
    <!-- step {"stepId":"npm","runShell":"npm --version"} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Stop when the help step is skipped
==================================

.. test {"testId":"data-route-onskip-stop","detectSteps":false}

#. Print the Node.js version:

   .. code-block:: shell

      node --version

   .. step {"runShell":"node --version","stepId":"version"}

#. If that failed, print the help for ``node``:

   .. code-block:: shell

      node --help

   .. step {"if":"$$steps.version.outputs.exitCode != 0","runShell":"node --help","onSkip":[{"stop":"test"}]}

#. Print the npm version:

   .. code-block:: shell

      npm --version

   .. step {"stepId":"npm","runShell":"npm --version"}

.. test end
```

#### DITA

**`inline.dita`**

```xml title="inline.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="data-route-onskip-stop">
  <title>Stop when the help step is skipped</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"data-route-onskip-stop","detectSteps":false}'/>
    <steps>
      <step><cmd>Print the Node.js version:</cmd>
        <info><codeblock outputclass="language-shell">node --version</codeblock>
          <data name="doc-detective" value='step {"runShell":"node --version","stepId":"version"}'/></info></step>
      <step><cmd>If that failed, print the help for <codeph>node</codeph>:</cmd>
        <info><codeblock outputclass="language-shell">node --help</codeblock>
          <data name="doc-detective" value='step {"if":"$$steps.version.outputs.exitCode != 0","runShell":"node --help","onSkip":[{"stop":"test"}]}'/></info></step>
      <step><cmd>Print the npm version:</cmd>
        <info><codeblock outputclass="language-shell">npm --version</codeblock>
          <data name="doc-detective" value='step {"stepId":"npm","runShell":"npm --version"}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "data-route-onskip-stop",
      "steps": [
        {
          "runShell": "node --version",
          "stepId": "version"
        },
        {
          "if": "$$steps.version.outputs.exitCode != 0",
          "runShell": "node --help",
          "onSkip": [
            {
              "stop": "test"
            }
          ]
        },
        {
          "stepId": "npm",
          "runShell": "npm --version"
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: data-route-onskip-stop
    steps:
      - runShell: node --version
        stepId: version
      - if: $$steps.version.outputs.exitCode != 0
        runShell: node --help
        onSkip:
          - stop: test
      - stepId: npm
        runShell: npm --version
```

### `onSkip`, `goToStep`

**Varies:** `step.onSkip` · **Value:** `[{"goToStep": "path"}]` · **Effect:** the help step is skipped and jumps to `path`, so the npm step doesn't run.

#### Prose

#### Markdown

**`prose.md`**

````markdown title="prose.md"
# Jump past the help steps

1. Print the Node.js version:

   ```shell
   node --version
   ```
2. If that failed, print the help for `node`:

   ```shell
   node --help
   ```
3. Print the npm version:

   ```shell
   npm --version
   ```
4. Find the Node.js executable:

   ```shell
   command -v node
   ```
````

#### MDX

**`prose.mdx`**

````mdx title="prose.mdx"
# Jump past the help steps

1. Print the Node.js version:

   ```shell
   node --version
   ```
2. If that failed, print the help for `node`:

   ```shell
   node --help
   ```
3. Print the npm version:

   ```shell
   npm --version
   ```
4. Find the Node.js executable:

   ```shell
   command -v node
   ```
````

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Jump past the help steps

. Print the Node.js version:
+
[source,shell]
----
node --version
----
. If that failed, print the help for `+node+`:
+
[source,shell]
----
node --help
----
. Print the npm version:
+
[source,shell]
----
npm --version
----
. Find the Node.js executable:
+
[source,shell]
----
command -v node
----
```

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Jump past the help steps</title></head>
<body>
<h1>Jump past the help steps</h1>
<ol>
  <li>Print the Node.js version:
    <pre><code class="language-shell">node --version</code></pre></li>
  <li>If that failed, print the help for <code>node</code>:
    <pre><code class="language-shell">node --help</code></pre></li>
  <li>Print the npm version:
    <pre><code class="language-shell">npm --version</code></pre></li>
  <li>Find the Node.js executable:
    <pre><code class="language-shell">command -v node</code></pre></li>
</ol>
</body>
</html>
```

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Jump past the help steps
========================

#. Print the Node.js version:

   .. code-block:: shell

      node --version

#. If that failed, print the help for ``node``:

   .. code-block:: shell

      node --help

#. Print the npm version:

   .. code-block:: shell

      npm --version

#. Find the Node.js executable:

   .. code-block:: shell

      command -v node
```

#### DITA

**`prose.dita`**

```xml title="prose.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="data-route-onskip-gotostep">
  <title>Jump past the help steps</title>
  <taskbody>
    <steps>
      <step><cmd>Print the Node.js version:</cmd>
        <info><codeblock outputclass="language-shell">node --version</codeblock></info></step>
      <step><cmd>If that failed, print the help for <codeph>node</codeph>:</cmd>
        <info><codeblock outputclass="language-shell">node --help</codeblock></info></step>
      <step><cmd>Print the npm version:</cmd>
        <info><codeblock outputclass="language-shell">npm --version</codeblock></info></step>
      <step><cmd>Find the Node.js executable:</cmd>
        <info><codeblock outputclass="language-shell">command -v node</codeblock></info></step>
    </steps>
  </taskbody>
</task>
```

#### Detected

#### Markdown

**`detected.md`**

````markdown title="detected.md"
<!-- test {"testId":"data-route-onskip-gotostep","detectSteps":true} -->

# Jump past the help steps

1. Print the Node.js version:

   ```shell
   node --version
   ```
   <!-- step {"runShell":"node --version","stepId":"version"} -->
2. If that failed, print the help for `node`:

   ```shell
   node --help
   ```
   <!-- step {"if":"$$steps.version.outputs.exitCode != 0","runShell":"node --help","onSkip":[{"goToStep":"path"}]} -->
3. Print the npm version:

   ```shell
   npm --version
   ```
   <!-- step {"stepId":"npm","runShell":"npm --version"} -->
4. Find the Node.js executable:

   ```shell
   command -v node
   ```
   <!-- step {"stepId":"path","runShell":"command -v node"} -->

<!-- test end -->
````

#### MDX

**`detected.mdx`**

````mdx title="detected.mdx"
{/* test {"testId":"data-route-onskip-gotostep","detectSteps":true} */}

# Jump past the help steps

1. Print the Node.js version:

   ```shell
   node --version
   ```
   {/* step {"runShell":"node --version","stepId":"version"} */}
2. If that failed, print the help for `node`:

   ```shell
   node --help
   ```
   {/* step {"if":"$$steps.version.outputs.exitCode != 0","runShell":"node --help","onSkip":[{"goToStep":"path"}]} */}
3. Print the npm version:

   ```shell
   npm --version
   ```
   {/* step {"stepId":"npm","runShell":"npm --version"} */}
4. Find the Node.js executable:

   ```shell
   command -v node
   ```
   {/* step {"stepId":"path","runShell":"command -v node"} */}

{/* test end */}
````

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Jump past the help steps

// (test {"testId":"data-route-onskip-gotostep","detectSteps":true})

. Print the Node.js version:
+
[source,shell]
----
node --version
----
+
// (step {"runShell":"node --version","stepId":"version"})
. If that failed, print the help for `+node+`:
+
[source,shell]
----
node --help
----
+
// (step {"if":"$$steps.version.outputs.exitCode != 0","runShell":"node --help","onSkip":[{"goToStep":"path"}]})
. Print the npm version:
+
[source,shell]
----
npm --version
----
+
// (step {"stepId":"npm","runShell":"npm --version"})
. Find the Node.js executable:
+
[source,shell]
----
command -v node
----
+
// (step {"stepId":"path","runShell":"command -v node"})

// (test end)
```

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Jump past the help steps</title></head>
<body>
<!-- test {"testId":"data-route-onskip-gotostep","detectSteps":true} -->
<h1>Jump past the help steps</h1>
<ol>
  <li>Print the Node.js version:
    <pre><code class="language-shell">node --version</code></pre>
    <!-- step {"runShell":"node --version","stepId":"version"} --></li>
  <li>If that failed, print the help for <code>node</code>:
    <pre><code class="language-shell">node --help</code></pre>
    <!-- step {"if":"$$steps.version.outputs.exitCode != 0","runShell":"node --help","onSkip":[{"goToStep":"path"}]} --></li>
  <li>Print the npm version:
    <pre><code class="language-shell">npm --version</code></pre>
    <!-- step {"stepId":"npm","runShell":"npm --version"} --></li>
  <li>Find the Node.js executable:
    <pre><code class="language-shell">command -v node</code></pre>
    <!-- step {"stepId":"path","runShell":"command -v node"} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Jump past the help steps
========================

.. test {"testId":"data-route-onskip-gotostep","detectSteps":true}

#. Print the Node.js version:

   .. code-block:: shell

      node --version

   .. step {"runShell":"node --version","stepId":"version"}

#. If that failed, print the help for ``node``:

   .. code-block:: shell

      node --help

   .. step {"if":"$$steps.version.outputs.exitCode != 0","runShell":"node --help","onSkip":[{"goToStep":"path"}]}

#. Print the npm version:

   .. code-block:: shell

      npm --version

   .. step {"stepId":"npm","runShell":"npm --version"}

#. Find the Node.js executable:

   .. code-block:: shell

      command -v node

   .. step {"stepId":"path","runShell":"command -v node"}

.. test end
```

#### DITA

**`detected.dita`**

```xml title="detected.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="data-route-onskip-gotostep">
  <title>Jump past the help steps</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"data-route-onskip-gotostep","detectSteps":true}'/>
    <steps>
      <step><cmd>Print the Node.js version:</cmd>
        <info><codeblock outputclass="language-shell">node --version</codeblock>
          <data name="doc-detective" value='step {"runShell":"node --version","stepId":"version"}'/></info></step>
      <step><cmd>If that failed, print the help for <codeph>node</codeph>:</cmd>
        <info><codeblock outputclass="language-shell">node --help</codeblock>
          <data name="doc-detective" value='step {"if":"$$steps.version.outputs.exitCode != 0","runShell":"node --help","onSkip":[{"goToStep":"path"}]}'/></info></step>
      <step><cmd>Print the npm version:</cmd>
        <info><codeblock outputclass="language-shell">npm --version</codeblock>
          <data name="doc-detective" value='step {"stepId":"npm","runShell":"npm --version"}'/></info></step>
      <step><cmd>Find the Node.js executable:</cmd>
        <info><codeblock outputclass="language-shell">command -v node</codeblock>
          <data name="doc-detective" value='step {"stepId":"path","runShell":"command -v node"}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Inline

#### Markdown

**`inline.md`**

````markdown title="inline.md"
<!-- test {"testId":"data-route-onskip-gotostep","detectSteps":false} -->

# Jump past the help steps

1. Print the Node.js version:

   ```shell
   node --version
   ```
   <!-- step {"runShell":"node --version","stepId":"version"} -->
2. If that failed, print the help for `node`:

   ```shell
   node --help
   ```
   <!-- step {"if":"$$steps.version.outputs.exitCode != 0","runShell":"node --help","onSkip":[{"goToStep":"path"}]} -->
3. Print the npm version:

   ```shell
   npm --version
   ```
   <!-- step {"stepId":"npm","runShell":"npm --version"} -->
4. Find the Node.js executable:

   ```shell
   command -v node
   ```
   <!-- step {"stepId":"path","runShell":"command -v node"} -->

<!-- test end -->
````

#### MDX

**`inline.mdx`**

````mdx title="inline.mdx"
{/* test {"testId":"data-route-onskip-gotostep","detectSteps":false} */}

# Jump past the help steps

1. Print the Node.js version:

   ```shell
   node --version
   ```
   {/* step {"runShell":"node --version","stepId":"version"} */}
2. If that failed, print the help for `node`:

   ```shell
   node --help
   ```
   {/* step {"if":"$$steps.version.outputs.exitCode != 0","runShell":"node --help","onSkip":[{"goToStep":"path"}]} */}
3. Print the npm version:

   ```shell
   npm --version
   ```
   {/* step {"stepId":"npm","runShell":"npm --version"} */}
4. Find the Node.js executable:

   ```shell
   command -v node
   ```
   {/* step {"stepId":"path","runShell":"command -v node"} */}

{/* test end */}
````

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Jump past the help steps

// (test {"testId":"data-route-onskip-gotostep","detectSteps":false})

. Print the Node.js version:
+
[source,shell]
----
node --version
----
+
// (step {"runShell":"node --version","stepId":"version"})
. If that failed, print the help for `+node+`:
+
[source,shell]
----
node --help
----
+
// (step {"if":"$$steps.version.outputs.exitCode != 0","runShell":"node --help","onSkip":[{"goToStep":"path"}]})
. Print the npm version:
+
[source,shell]
----
npm --version
----
+
// (step {"stepId":"npm","runShell":"npm --version"})
. Find the Node.js executable:
+
[source,shell]
----
command -v node
----
+
// (step {"stepId":"path","runShell":"command -v node"})

// (test end)
```

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Jump past the help steps</title></head>
<body>
<!-- test {"testId":"data-route-onskip-gotostep","detectSteps":false} -->
<h1>Jump past the help steps</h1>
<ol>
  <li>Print the Node.js version:
    <pre><code class="language-shell">node --version</code></pre>
    <!-- step {"runShell":"node --version","stepId":"version"} --></li>
  <li>If that failed, print the help for <code>node</code>:
    <pre><code class="language-shell">node --help</code></pre>
    <!-- step {"if":"$$steps.version.outputs.exitCode != 0","runShell":"node --help","onSkip":[{"goToStep":"path"}]} --></li>
  <li>Print the npm version:
    <pre><code class="language-shell">npm --version</code></pre>
    <!-- step {"stepId":"npm","runShell":"npm --version"} --></li>
  <li>Find the Node.js executable:
    <pre><code class="language-shell">command -v node</code></pre>
    <!-- step {"stepId":"path","runShell":"command -v node"} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Jump past the help steps
========================

.. test {"testId":"data-route-onskip-gotostep","detectSteps":false}

#. Print the Node.js version:

   .. code-block:: shell

      node --version

   .. step {"runShell":"node --version","stepId":"version"}

#. If that failed, print the help for ``node``:

   .. code-block:: shell

      node --help

   .. step {"if":"$$steps.version.outputs.exitCode != 0","runShell":"node --help","onSkip":[{"goToStep":"path"}]}

#. Print the npm version:

   .. code-block:: shell

      npm --version

   .. step {"stepId":"npm","runShell":"npm --version"}

#. Find the Node.js executable:

   .. code-block:: shell

      command -v node

   .. step {"stepId":"path","runShell":"command -v node"}

.. test end
```

#### DITA

**`inline.dita`**

```xml title="inline.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="data-route-onskip-gotostep">
  <title>Jump past the help steps</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"data-route-onskip-gotostep","detectSteps":false}'/>
    <steps>
      <step><cmd>Print the Node.js version:</cmd>
        <info><codeblock outputclass="language-shell">node --version</codeblock>
          <data name="doc-detective" value='step {"runShell":"node --version","stepId":"version"}'/></info></step>
      <step><cmd>If that failed, print the help for <codeph>node</codeph>:</cmd>
        <info><codeblock outputclass="language-shell">node --help</codeblock>
          <data name="doc-detective" value='step {"if":"$$steps.version.outputs.exitCode != 0","runShell":"node --help","onSkip":[{"goToStep":"path"}]}'/></info></step>
      <step><cmd>Print the npm version:</cmd>
        <info><codeblock outputclass="language-shell">npm --version</codeblock>
          <data name="doc-detective" value='step {"stepId":"npm","runShell":"npm --version"}'/></info></step>
      <step><cmd>Find the Node.js executable:</cmd>
        <info><codeblock outputclass="language-shell">command -v node</codeblock>
          <data name="doc-detective" value='step {"stepId":"path","runShell":"command -v node"}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "data-route-onskip-gotostep",
      "steps": [
        {
          "runShell": "node --version",
          "stepId": "version"
        },
        {
          "if": "$$steps.version.outputs.exitCode != 0",
          "runShell": "node --help",
          "onSkip": [
            {
              "goToStep": "path"
            }
          ]
        },
        {
          "stepId": "npm",
          "runShell": "npm --version"
        },
        {
          "stepId": "path",
          "runShell": "command -v node"
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: data-route-onskip-gotostep
    steps:
      - runShell: node --version
        stepId: version
      - if: $$steps.version.outputs.exitCode != 0
        runShell: node --help
        onSkip:
          - goToStep: path
      - stepId: npm
        runShell: npm --version
      - stepId: path
        runShell: command -v node
```

### `onSkip`, `retry`

**Varies:** `step.onSkip` · **Value:** `[{"retry": {"limit": 1}}]` · **Effect:** a step skipped by its `if` never ran, so `retry` doesn't run it again. It re-runs only a step whose own action returned `SKIPPED`.

#### Prose

#### Markdown

**`prose.md`**

````markdown title="prose.md"
# Retry a skipped step

1. Print the Node.js version:

   ```shell
   node --version
   ```
2. If that failed, print the help for `node`:

   ```shell
   node --help
   ```
3. Print the npm version:

   ```shell
   npm --version
   ```
````

#### MDX

**`prose.mdx`**

````mdx title="prose.mdx"
# Retry a skipped step

1. Print the Node.js version:

   ```shell
   node --version
   ```
2. If that failed, print the help for `node`:

   ```shell
   node --help
   ```
3. Print the npm version:

   ```shell
   npm --version
   ```
````

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Retry a skipped step

. Print the Node.js version:
+
[source,shell]
----
node --version
----
. If that failed, print the help for `+node+`:
+
[source,shell]
----
node --help
----
. Print the npm version:
+
[source,shell]
----
npm --version
----
```

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Retry a skipped step</title></head>
<body>
<h1>Retry a skipped step</h1>
<ol>
  <li>Print the Node.js version:
    <pre><code class="language-shell">node --version</code></pre></li>
  <li>If that failed, print the help for <code>node</code>:
    <pre><code class="language-shell">node --help</code></pre></li>
  <li>Print the npm version:
    <pre><code class="language-shell">npm --version</code></pre></li>
</ol>
</body>
</html>
```

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Retry a skipped step
====================

#. Print the Node.js version:

   .. code-block:: shell

      node --version

#. If that failed, print the help for ``node``:

   .. code-block:: shell

      node --help

#. Print the npm version:

   .. code-block:: shell

      npm --version
```

#### DITA

**`prose.dita`**

```xml title="prose.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="data-route-onskip-retry">
  <title>Retry a skipped step</title>
  <taskbody>
    <steps>
      <step><cmd>Print the Node.js version:</cmd>
        <info><codeblock outputclass="language-shell">node --version</codeblock></info></step>
      <step><cmd>If that failed, print the help for <codeph>node</codeph>:</cmd>
        <info><codeblock outputclass="language-shell">node --help</codeblock></info></step>
      <step><cmd>Print the npm version:</cmd>
        <info><codeblock outputclass="language-shell">npm --version</codeblock></info></step>
    </steps>
  </taskbody>
</task>
```

#### Detected

#### Markdown

**`detected.md`**

````markdown title="detected.md"
<!-- test {"testId":"data-route-onskip-retry","detectSteps":true} -->

# Retry a skipped step

1. Print the Node.js version:

   ```shell
   node --version
   ```
   <!-- step {"runShell":"node --version","stepId":"version"} -->
2. If that failed, print the help for `node`:

   ```shell
   node --help
   ```
   <!-- step {"if":"$$steps.version.outputs.exitCode != 0","runShell":"node --help","onSkip":[{"retry":{"limit":1}}]} -->
3. Print the npm version:

   ```shell
   npm --version
   ```
   <!-- step {"stepId":"npm","runShell":"npm --version"} -->

<!-- test end -->
````

#### MDX

**`detected.mdx`**

````mdx title="detected.mdx"
{/* test {"testId":"data-route-onskip-retry","detectSteps":true} */}

# Retry a skipped step

1. Print the Node.js version:

   ```shell
   node --version
   ```
   {/* step {"runShell":"node --version","stepId":"version"} */}
2. If that failed, print the help for `node`:

   ```shell
   node --help
   ```
   {/* step {"if":"$$steps.version.outputs.exitCode != 0","runShell":"node --help","onSkip":[{"retry":{"limit":1}}]} */}
3. Print the npm version:

   ```shell
   npm --version
   ```
   {/* step {"stepId":"npm","runShell":"npm --version"} */}

{/* test end */}
````

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Retry a skipped step

// (test {"testId":"data-route-onskip-retry","detectSteps":true})

. Print the Node.js version:
+
[source,shell]
----
node --version
----
+
// (step {"runShell":"node --version","stepId":"version"})
. If that failed, print the help for `+node+`:
+
[source,shell]
----
node --help
----
+
// (step {"if":"$$steps.version.outputs.exitCode != 0","runShell":"node --help","onSkip":[{"retry":{"limit":1}}]})
. Print the npm version:
+
[source,shell]
----
npm --version
----
+
// (step {"stepId":"npm","runShell":"npm --version"})

// (test end)
```

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Retry a skipped step</title></head>
<body>
<!-- test {"testId":"data-route-onskip-retry","detectSteps":true} -->
<h1>Retry a skipped step</h1>
<ol>
  <li>Print the Node.js version:
    <pre><code class="language-shell">node --version</code></pre>
    <!-- step {"runShell":"node --version","stepId":"version"} --></li>
  <li>If that failed, print the help for <code>node</code>:
    <pre><code class="language-shell">node --help</code></pre>
    <!-- step {"if":"$$steps.version.outputs.exitCode != 0","runShell":"node --help","onSkip":[{"retry":{"limit":1}}]} --></li>
  <li>Print the npm version:
    <pre><code class="language-shell">npm --version</code></pre>
    <!-- step {"stepId":"npm","runShell":"npm --version"} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Retry a skipped step
====================

.. test {"testId":"data-route-onskip-retry","detectSteps":true}

#. Print the Node.js version:

   .. code-block:: shell

      node --version

   .. step {"runShell":"node --version","stepId":"version"}

#. If that failed, print the help for ``node``:

   .. code-block:: shell

      node --help

   .. step {"if":"$$steps.version.outputs.exitCode != 0","runShell":"node --help","onSkip":[{"retry":{"limit":1}}]}

#. Print the npm version:

   .. code-block:: shell

      npm --version

   .. step {"stepId":"npm","runShell":"npm --version"}

.. test end
```

#### DITA

**`detected.dita`**

```xml title="detected.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="data-route-onskip-retry">
  <title>Retry a skipped step</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"data-route-onskip-retry","detectSteps":true}'/>
    <steps>
      <step><cmd>Print the Node.js version:</cmd>
        <info><codeblock outputclass="language-shell">node --version</codeblock>
          <data name="doc-detective" value='step {"runShell":"node --version","stepId":"version"}'/></info></step>
      <step><cmd>If that failed, print the help for <codeph>node</codeph>:</cmd>
        <info><codeblock outputclass="language-shell">node --help</codeblock>
          <data name="doc-detective" value='step {"if":"$$steps.version.outputs.exitCode != 0","runShell":"node --help","onSkip":[{"retry":{"limit":1}}]}'/></info></step>
      <step><cmd>Print the npm version:</cmd>
        <info><codeblock outputclass="language-shell">npm --version</codeblock>
          <data name="doc-detective" value='step {"stepId":"npm","runShell":"npm --version"}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Inline

#### Markdown

**`inline.md`**

````markdown title="inline.md"
<!-- test {"testId":"data-route-onskip-retry","detectSteps":false} -->

# Retry a skipped step

1. Print the Node.js version:

   ```shell
   node --version
   ```
   <!-- step {"runShell":"node --version","stepId":"version"} -->
2. If that failed, print the help for `node`:

   ```shell
   node --help
   ```
   <!-- step {"if":"$$steps.version.outputs.exitCode != 0","runShell":"node --help","onSkip":[{"retry":{"limit":1}}]} -->
3. Print the npm version:

   ```shell
   npm --version
   ```
   <!-- step {"stepId":"npm","runShell":"npm --version"} -->

<!-- test end -->
````

#### MDX

**`inline.mdx`**

````mdx title="inline.mdx"
{/* test {"testId":"data-route-onskip-retry","detectSteps":false} */}

# Retry a skipped step

1. Print the Node.js version:

   ```shell
   node --version
   ```
   {/* step {"runShell":"node --version","stepId":"version"} */}
2. If that failed, print the help for `node`:

   ```shell
   node --help
   ```
   {/* step {"if":"$$steps.version.outputs.exitCode != 0","runShell":"node --help","onSkip":[{"retry":{"limit":1}}]} */}
3. Print the npm version:

   ```shell
   npm --version
   ```
   {/* step {"stepId":"npm","runShell":"npm --version"} */}

{/* test end */}
````

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Retry a skipped step

// (test {"testId":"data-route-onskip-retry","detectSteps":false})

. Print the Node.js version:
+
[source,shell]
----
node --version
----
+
// (step {"runShell":"node --version","stepId":"version"})
. If that failed, print the help for `+node+`:
+
[source,shell]
----
node --help
----
+
// (step {"if":"$$steps.version.outputs.exitCode != 0","runShell":"node --help","onSkip":[{"retry":{"limit":1}}]})
. Print the npm version:
+
[source,shell]
----
npm --version
----
+
// (step {"stepId":"npm","runShell":"npm --version"})

// (test end)
```

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Retry a skipped step</title></head>
<body>
<!-- test {"testId":"data-route-onskip-retry","detectSteps":false} -->
<h1>Retry a skipped step</h1>
<ol>
  <li>Print the Node.js version:
    <pre><code class="language-shell">node --version</code></pre>
    <!-- step {"runShell":"node --version","stepId":"version"} --></li>
  <li>If that failed, print the help for <code>node</code>:
    <pre><code class="language-shell">node --help</code></pre>
    <!-- step {"if":"$$steps.version.outputs.exitCode != 0","runShell":"node --help","onSkip":[{"retry":{"limit":1}}]} --></li>
  <li>Print the npm version:
    <pre><code class="language-shell">npm --version</code></pre>
    <!-- step {"stepId":"npm","runShell":"npm --version"} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Retry a skipped step
====================

.. test {"testId":"data-route-onskip-retry","detectSteps":false}

#. Print the Node.js version:

   .. code-block:: shell

      node --version

   .. step {"runShell":"node --version","stepId":"version"}

#. If that failed, print the help for ``node``:

   .. code-block:: shell

      node --help

   .. step {"if":"$$steps.version.outputs.exitCode != 0","runShell":"node --help","onSkip":[{"retry":{"limit":1}}]}

#. Print the npm version:

   .. code-block:: shell

      npm --version

   .. step {"stepId":"npm","runShell":"npm --version"}

.. test end
```

#### DITA

**`inline.dita`**

```xml title="inline.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="data-route-onskip-retry">
  <title>Retry a skipped step</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"data-route-onskip-retry","detectSteps":false}'/>
    <steps>
      <step><cmd>Print the Node.js version:</cmd>
        <info><codeblock outputclass="language-shell">node --version</codeblock>
          <data name="doc-detective" value='step {"runShell":"node --version","stepId":"version"}'/></info></step>
      <step><cmd>If that failed, print the help for <codeph>node</codeph>:</cmd>
        <info><codeblock outputclass="language-shell">node --help</codeblock>
          <data name="doc-detective" value='step {"if":"$$steps.version.outputs.exitCode != 0","runShell":"node --help","onSkip":[{"retry":{"limit":1}}]}'/></info></step>
      <step><cmd>Print the npm version:</cmd>
        <info><codeblock outputclass="language-shell">npm --version</codeblock>
          <data name="doc-detective" value='step {"stepId":"npm","runShell":"npm --version"}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "data-route-onskip-retry",
      "steps": [
        {
          "runShell": "node --version",
          "stepId": "version"
        },
        {
          "if": "$$steps.version.outputs.exitCode != 0",
          "runShell": "node --help",
          "onSkip": [
            {
              "retry": {
                "limit": 1
              }
            }
          ]
        },
        {
          "stepId": "npm",
          "runShell": "npm --version"
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: data-route-onskip-retry
    steps:
      - runShell: node --version
        stepId: version
      - if: $$steps.version.outputs.exitCode != 0
        runShell: node --help
        onSkip:
          - retry:
              limit: 1
      - stepId: npm
        runShell: npm --version
```

### `onWarning`, `continue`

**Varies:** `step.onWarning` · **Value:** `[{"continue": true}]` · **Effect:** applies only if the step ends with a warning, and moves on. That's also the default. Here the step passes.

#### Prose

#### Markdown

**`prose.md`**

````markdown title="prose.md"
# Print tool versions after a warning

1. Print the Node.js version:

   ```shell
   node --version
   ```
2. Print the npm version:

   ```shell
   npm --version
   ```
````

#### MDX

**`prose.mdx`**

````mdx title="prose.mdx"
# Print tool versions after a warning

1. Print the Node.js version:

   ```shell
   node --version
   ```
2. Print the npm version:

   ```shell
   npm --version
   ```
````

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Print tool versions after a warning

. Print the Node.js version:
+
[source,shell]
----
node --version
----
. Print the npm version:
+
[source,shell]
----
npm --version
----
```

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Print tool versions after a warning</title></head>
<body>
<h1>Print tool versions after a warning</h1>
<ol>
  <li>Print the Node.js version:
    <pre><code class="language-shell">node --version</code></pre></li>
  <li>Print the npm version:
    <pre><code class="language-shell">npm --version</code></pre></li>
</ol>
</body>
</html>
```

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Print tool versions after a warning
===================================

#. Print the Node.js version:

   .. code-block:: shell

      node --version

#. Print the npm version:

   .. code-block:: shell

      npm --version
```

#### DITA

**`prose.dita`**

```xml title="prose.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="data-route-onwarning-continue">
  <title>Print tool versions after a warning</title>
  <taskbody>
    <steps>
      <step><cmd>Print the Node.js version:</cmd>
        <info><codeblock outputclass="language-shell">node --version</codeblock></info></step>
      <step><cmd>Print the npm version:</cmd>
        <info><codeblock outputclass="language-shell">npm --version</codeblock></info></step>
    </steps>
  </taskbody>
</task>
```

#### Detected

#### Markdown

**`detected.md`**

````markdown title="detected.md"
<!-- test {"testId":"data-route-onwarning-continue","detectSteps":true} -->

# Print tool versions after a warning

1. Print the Node.js version:

   ```shell
   node --version
   ```
   <!-- step {"runShell":"node --version","onWarning":[{"continue":true}]} -->
2. Print the npm version:

   ```shell
   npm --version
   ```
   <!-- step {"stepId":"npm","runShell":"npm --version"} -->

<!-- test end -->
````

#### MDX

**`detected.mdx`**

````mdx title="detected.mdx"
{/* test {"testId":"data-route-onwarning-continue","detectSteps":true} */}

# Print tool versions after a warning

1. Print the Node.js version:

   ```shell
   node --version
   ```
   {/* step {"runShell":"node --version","onWarning":[{"continue":true}]} */}
2. Print the npm version:

   ```shell
   npm --version
   ```
   {/* step {"stepId":"npm","runShell":"npm --version"} */}

{/* test end */}
````

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Print tool versions after a warning

// (test {"testId":"data-route-onwarning-continue","detectSteps":true})

. Print the Node.js version:
+
[source,shell]
----
node --version
----
+
// (step {"runShell":"node --version","onWarning":[{"continue":true}]})
. Print the npm version:
+
[source,shell]
----
npm --version
----
+
// (step {"stepId":"npm","runShell":"npm --version"})

// (test end)
```

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Print tool versions after a warning</title></head>
<body>
<!-- test {"testId":"data-route-onwarning-continue","detectSteps":true} -->
<h1>Print tool versions after a warning</h1>
<ol>
  <li>Print the Node.js version:
    <pre><code class="language-shell">node --version</code></pre>
    <!-- step {"runShell":"node --version","onWarning":[{"continue":true}]} --></li>
  <li>Print the npm version:
    <pre><code class="language-shell">npm --version</code></pre>
    <!-- step {"stepId":"npm","runShell":"npm --version"} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Print tool versions after a warning
===================================

.. test {"testId":"data-route-onwarning-continue","detectSteps":true}

#. Print the Node.js version:

   .. code-block:: shell

      node --version

   .. step {"runShell":"node --version","onWarning":[{"continue":true}]}

#. Print the npm version:

   .. code-block:: shell

      npm --version

   .. step {"stepId":"npm","runShell":"npm --version"}

.. test end
```

#### DITA

**`detected.dita`**

```xml title="detected.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="data-route-onwarning-continue">
  <title>Print tool versions after a warning</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"data-route-onwarning-continue","detectSteps":true}'/>
    <steps>
      <step><cmd>Print the Node.js version:</cmd>
        <info><codeblock outputclass="language-shell">node --version</codeblock>
          <data name="doc-detective" value='step {"runShell":"node --version","onWarning":[{"continue":true}]}'/></info></step>
      <step><cmd>Print the npm version:</cmd>
        <info><codeblock outputclass="language-shell">npm --version</codeblock>
          <data name="doc-detective" value='step {"stepId":"npm","runShell":"npm --version"}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Inline

#### Markdown

**`inline.md`**

````markdown title="inline.md"
<!-- test {"testId":"data-route-onwarning-continue","detectSteps":false} -->

# Print tool versions after a warning

1. Print the Node.js version:

   ```shell
   node --version
   ```
   <!-- step {"runShell":"node --version","onWarning":[{"continue":true}]} -->
2. Print the npm version:

   ```shell
   npm --version
   ```
   <!-- step {"stepId":"npm","runShell":"npm --version"} -->

<!-- test end -->
````

#### MDX

**`inline.mdx`**

````mdx title="inline.mdx"
{/* test {"testId":"data-route-onwarning-continue","detectSteps":false} */}

# Print tool versions after a warning

1. Print the Node.js version:

   ```shell
   node --version
   ```
   {/* step {"runShell":"node --version","onWarning":[{"continue":true}]} */}
2. Print the npm version:

   ```shell
   npm --version
   ```
   {/* step {"stepId":"npm","runShell":"npm --version"} */}

{/* test end */}
````

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Print tool versions after a warning

// (test {"testId":"data-route-onwarning-continue","detectSteps":false})

. Print the Node.js version:
+
[source,shell]
----
node --version
----
+
// (step {"runShell":"node --version","onWarning":[{"continue":true}]})
. Print the npm version:
+
[source,shell]
----
npm --version
----
+
// (step {"stepId":"npm","runShell":"npm --version"})

// (test end)
```

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Print tool versions after a warning</title></head>
<body>
<!-- test {"testId":"data-route-onwarning-continue","detectSteps":false} -->
<h1>Print tool versions after a warning</h1>
<ol>
  <li>Print the Node.js version:
    <pre><code class="language-shell">node --version</code></pre>
    <!-- step {"runShell":"node --version","onWarning":[{"continue":true}]} --></li>
  <li>Print the npm version:
    <pre><code class="language-shell">npm --version</code></pre>
    <!-- step {"stepId":"npm","runShell":"npm --version"} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Print tool versions after a warning
===================================

.. test {"testId":"data-route-onwarning-continue","detectSteps":false}

#. Print the Node.js version:

   .. code-block:: shell

      node --version

   .. step {"runShell":"node --version","onWarning":[{"continue":true}]}

#. Print the npm version:

   .. code-block:: shell

      npm --version

   .. step {"stepId":"npm","runShell":"npm --version"}

.. test end
```

#### DITA

**`inline.dita`**

```xml title="inline.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="data-route-onwarning-continue">
  <title>Print tool versions after a warning</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"data-route-onwarning-continue","detectSteps":false}'/>
    <steps>
      <step><cmd>Print the Node.js version:</cmd>
        <info><codeblock outputclass="language-shell">node --version</codeblock>
          <data name="doc-detective" value='step {"runShell":"node --version","onWarning":[{"continue":true}]}'/></info></step>
      <step><cmd>Print the npm version:</cmd>
        <info><codeblock outputclass="language-shell">npm --version</codeblock>
          <data name="doc-detective" value='step {"stepId":"npm","runShell":"npm --version"}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "data-route-onwarning-continue",
      "steps": [
        {
          "runShell": "node --version",
          "onWarning": [
            {
              "continue": true
            }
          ]
        },
        {
          "stepId": "npm",
          "runShell": "npm --version"
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: data-route-onwarning-continue
    steps:
      - runShell: node --version
        onWarning:
          - continue: true
      - stepId: npm
        runShell: npm --version
```

### `onWarning`, `stop`

**Varies:** `step.onWarning` · **Value:** `[{"stop": "test"}]` · **Effect:** applies only if the step ends with a warning, and stops the test. Here the step passes.

#### Prose

#### Markdown

**`prose.md`**

````markdown title="prose.md"
# Stop after a warning

1. Print the Node.js version:

   ```shell
   node --version
   ```
2. Print the npm version:

   ```shell
   npm --version
   ```
````

#### MDX

**`prose.mdx`**

````mdx title="prose.mdx"
# Stop after a warning

1. Print the Node.js version:

   ```shell
   node --version
   ```
2. Print the npm version:

   ```shell
   npm --version
   ```
````

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Stop after a warning

. Print the Node.js version:
+
[source,shell]
----
node --version
----
. Print the npm version:
+
[source,shell]
----
npm --version
----
```

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Stop after a warning</title></head>
<body>
<h1>Stop after a warning</h1>
<ol>
  <li>Print the Node.js version:
    <pre><code class="language-shell">node --version</code></pre></li>
  <li>Print the npm version:
    <pre><code class="language-shell">npm --version</code></pre></li>
</ol>
</body>
</html>
```

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Stop after a warning
====================

#. Print the Node.js version:

   .. code-block:: shell

      node --version

#. Print the npm version:

   .. code-block:: shell

      npm --version
```

#### DITA

**`prose.dita`**

```xml title="prose.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="data-route-onwarning-stop">
  <title>Stop after a warning</title>
  <taskbody>
    <steps>
      <step><cmd>Print the Node.js version:</cmd>
        <info><codeblock outputclass="language-shell">node --version</codeblock></info></step>
      <step><cmd>Print the npm version:</cmd>
        <info><codeblock outputclass="language-shell">npm --version</codeblock></info></step>
    </steps>
  </taskbody>
</task>
```

#### Detected

#### Markdown

**`detected.md`**

````markdown title="detected.md"
<!-- test {"testId":"data-route-onwarning-stop","detectSteps":true} -->

# Stop after a warning

1. Print the Node.js version:

   ```shell
   node --version
   ```
   <!-- step {"runShell":"node --version","onWarning":[{"stop":"test"}]} -->
2. Print the npm version:

   ```shell
   npm --version
   ```
   <!-- step {"stepId":"npm","runShell":"npm --version"} -->

<!-- test end -->
````

#### MDX

**`detected.mdx`**

````mdx title="detected.mdx"
{/* test {"testId":"data-route-onwarning-stop","detectSteps":true} */}

# Stop after a warning

1. Print the Node.js version:

   ```shell
   node --version
   ```
   {/* step {"runShell":"node --version","onWarning":[{"stop":"test"}]} */}
2. Print the npm version:

   ```shell
   npm --version
   ```
   {/* step {"stepId":"npm","runShell":"npm --version"} */}

{/* test end */}
````

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Stop after a warning

// (test {"testId":"data-route-onwarning-stop","detectSteps":true})

. Print the Node.js version:
+
[source,shell]
----
node --version
----
+
// (step {"runShell":"node --version","onWarning":[{"stop":"test"}]})
. Print the npm version:
+
[source,shell]
----
npm --version
----
+
// (step {"stepId":"npm","runShell":"npm --version"})

// (test end)
```

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Stop after a warning</title></head>
<body>
<!-- test {"testId":"data-route-onwarning-stop","detectSteps":true} -->
<h1>Stop after a warning</h1>
<ol>
  <li>Print the Node.js version:
    <pre><code class="language-shell">node --version</code></pre>
    <!-- step {"runShell":"node --version","onWarning":[{"stop":"test"}]} --></li>
  <li>Print the npm version:
    <pre><code class="language-shell">npm --version</code></pre>
    <!-- step {"stepId":"npm","runShell":"npm --version"} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Stop after a warning
====================

.. test {"testId":"data-route-onwarning-stop","detectSteps":true}

#. Print the Node.js version:

   .. code-block:: shell

      node --version

   .. step {"runShell":"node --version","onWarning":[{"stop":"test"}]}

#. Print the npm version:

   .. code-block:: shell

      npm --version

   .. step {"stepId":"npm","runShell":"npm --version"}

.. test end
```

#### DITA

**`detected.dita`**

```xml title="detected.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="data-route-onwarning-stop">
  <title>Stop after a warning</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"data-route-onwarning-stop","detectSteps":true}'/>
    <steps>
      <step><cmd>Print the Node.js version:</cmd>
        <info><codeblock outputclass="language-shell">node --version</codeblock>
          <data name="doc-detective" value='step {"runShell":"node --version","onWarning":[{"stop":"test"}]}'/></info></step>
      <step><cmd>Print the npm version:</cmd>
        <info><codeblock outputclass="language-shell">npm --version</codeblock>
          <data name="doc-detective" value='step {"stepId":"npm","runShell":"npm --version"}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Inline

#### Markdown

**`inline.md`**

````markdown title="inline.md"
<!-- test {"testId":"data-route-onwarning-stop","detectSteps":false} -->

# Stop after a warning

1. Print the Node.js version:

   ```shell
   node --version
   ```
   <!-- step {"runShell":"node --version","onWarning":[{"stop":"test"}]} -->
2. Print the npm version:

   ```shell
   npm --version
   ```
   <!-- step {"stepId":"npm","runShell":"npm --version"} -->

<!-- test end -->
````

#### MDX

**`inline.mdx`**

````mdx title="inline.mdx"
{/* test {"testId":"data-route-onwarning-stop","detectSteps":false} */}

# Stop after a warning

1. Print the Node.js version:

   ```shell
   node --version
   ```
   {/* step {"runShell":"node --version","onWarning":[{"stop":"test"}]} */}
2. Print the npm version:

   ```shell
   npm --version
   ```
   {/* step {"stepId":"npm","runShell":"npm --version"} */}

{/* test end */}
````

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Stop after a warning

// (test {"testId":"data-route-onwarning-stop","detectSteps":false})

. Print the Node.js version:
+
[source,shell]
----
node --version
----
+
// (step {"runShell":"node --version","onWarning":[{"stop":"test"}]})
. Print the npm version:
+
[source,shell]
----
npm --version
----
+
// (step {"stepId":"npm","runShell":"npm --version"})

// (test end)
```

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Stop after a warning</title></head>
<body>
<!-- test {"testId":"data-route-onwarning-stop","detectSteps":false} -->
<h1>Stop after a warning</h1>
<ol>
  <li>Print the Node.js version:
    <pre><code class="language-shell">node --version</code></pre>
    <!-- step {"runShell":"node --version","onWarning":[{"stop":"test"}]} --></li>
  <li>Print the npm version:
    <pre><code class="language-shell">npm --version</code></pre>
    <!-- step {"stepId":"npm","runShell":"npm --version"} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Stop after a warning
====================

.. test {"testId":"data-route-onwarning-stop","detectSteps":false}

#. Print the Node.js version:

   .. code-block:: shell

      node --version

   .. step {"runShell":"node --version","onWarning":[{"stop":"test"}]}

#. Print the npm version:

   .. code-block:: shell

      npm --version

   .. step {"stepId":"npm","runShell":"npm --version"}

.. test end
```

#### DITA

**`inline.dita`**

```xml title="inline.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="data-route-onwarning-stop">
  <title>Stop after a warning</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"data-route-onwarning-stop","detectSteps":false}'/>
    <steps>
      <step><cmd>Print the Node.js version:</cmd>
        <info><codeblock outputclass="language-shell">node --version</codeblock>
          <data name="doc-detective" value='step {"runShell":"node --version","onWarning":[{"stop":"test"}]}'/></info></step>
      <step><cmd>Print the npm version:</cmd>
        <info><codeblock outputclass="language-shell">npm --version</codeblock>
          <data name="doc-detective" value='step {"stepId":"npm","runShell":"npm --version"}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "data-route-onwarning-stop",
      "steps": [
        {
          "runShell": "node --version",
          "onWarning": [
            {
              "stop": "test"
            }
          ]
        },
        {
          "stepId": "npm",
          "runShell": "npm --version"
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: data-route-onwarning-stop
    steps:
      - runShell: node --version
        onWarning:
          - stop: test
      - stepId: npm
        runShell: npm --version
```

### `onWarning`, `goToStep`

**Varies:** `step.onWarning` · **Value:** `[{"goToStep": "path"}]` · **Effect:** applies only if the step ends with a warning, and jumps to `path`. Here the step passes.

#### Prose

#### Markdown

**`prose.md`**

````markdown title="prose.md"
# Jump ahead after a warning

1. Print the Node.js version:

   ```shell
   node --version
   ```
2. Print the npm version:

   ```shell
   npm --version
   ```
3. Find the Node.js executable:

   ```shell
   command -v node
   ```
````

#### MDX

**`prose.mdx`**

````mdx title="prose.mdx"
# Jump ahead after a warning

1. Print the Node.js version:

   ```shell
   node --version
   ```
2. Print the npm version:

   ```shell
   npm --version
   ```
3. Find the Node.js executable:

   ```shell
   command -v node
   ```
````

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Jump ahead after a warning

. Print the Node.js version:
+
[source,shell]
----
node --version
----
. Print the npm version:
+
[source,shell]
----
npm --version
----
. Find the Node.js executable:
+
[source,shell]
----
command -v node
----
```

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Jump ahead after a warning</title></head>
<body>
<h1>Jump ahead after a warning</h1>
<ol>
  <li>Print the Node.js version:
    <pre><code class="language-shell">node --version</code></pre></li>
  <li>Print the npm version:
    <pre><code class="language-shell">npm --version</code></pre></li>
  <li>Find the Node.js executable:
    <pre><code class="language-shell">command -v node</code></pre></li>
</ol>
</body>
</html>
```

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Jump ahead after a warning
==========================

#. Print the Node.js version:

   .. code-block:: shell

      node --version

#. Print the npm version:

   .. code-block:: shell

      npm --version

#. Find the Node.js executable:

   .. code-block:: shell

      command -v node
```

#### DITA

**`prose.dita`**

```xml title="prose.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="data-route-onwarning-gotostep">
  <title>Jump ahead after a warning</title>
  <taskbody>
    <steps>
      <step><cmd>Print the Node.js version:</cmd>
        <info><codeblock outputclass="language-shell">node --version</codeblock></info></step>
      <step><cmd>Print the npm version:</cmd>
        <info><codeblock outputclass="language-shell">npm --version</codeblock></info></step>
      <step><cmd>Find the Node.js executable:</cmd>
        <info><codeblock outputclass="language-shell">command -v node</codeblock></info></step>
    </steps>
  </taskbody>
</task>
```

#### Detected

#### Markdown

**`detected.md`**

````markdown title="detected.md"
<!-- test {"testId":"data-route-onwarning-gotostep","detectSteps":true} -->

# Jump ahead after a warning

1. Print the Node.js version:

   ```shell
   node --version
   ```
   <!-- step {"runShell":"node --version","onWarning":[{"goToStep":"path"}]} -->
2. Print the npm version:

   ```shell
   npm --version
   ```
   <!-- step {"stepId":"npm","runShell":"npm --version"} -->
3. Find the Node.js executable:

   ```shell
   command -v node
   ```
   <!-- step {"stepId":"path","runShell":"command -v node"} -->

<!-- test end -->
````

#### MDX

**`detected.mdx`**

````mdx title="detected.mdx"
{/* test {"testId":"data-route-onwarning-gotostep","detectSteps":true} */}

# Jump ahead after a warning

1. Print the Node.js version:

   ```shell
   node --version
   ```
   {/* step {"runShell":"node --version","onWarning":[{"goToStep":"path"}]} */}
2. Print the npm version:

   ```shell
   npm --version
   ```
   {/* step {"stepId":"npm","runShell":"npm --version"} */}
3. Find the Node.js executable:

   ```shell
   command -v node
   ```
   {/* step {"stepId":"path","runShell":"command -v node"} */}

{/* test end */}
````

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Jump ahead after a warning

// (test {"testId":"data-route-onwarning-gotostep","detectSteps":true})

. Print the Node.js version:
+
[source,shell]
----
node --version
----
+
// (step {"runShell":"node --version","onWarning":[{"goToStep":"path"}]})
. Print the npm version:
+
[source,shell]
----
npm --version
----
+
// (step {"stepId":"npm","runShell":"npm --version"})
. Find the Node.js executable:
+
[source,shell]
----
command -v node
----
+
// (step {"stepId":"path","runShell":"command -v node"})

// (test end)
```

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Jump ahead after a warning</title></head>
<body>
<!-- test {"testId":"data-route-onwarning-gotostep","detectSteps":true} -->
<h1>Jump ahead after a warning</h1>
<ol>
  <li>Print the Node.js version:
    <pre><code class="language-shell">node --version</code></pre>
    <!-- step {"runShell":"node --version","onWarning":[{"goToStep":"path"}]} --></li>
  <li>Print the npm version:
    <pre><code class="language-shell">npm --version</code></pre>
    <!-- step {"stepId":"npm","runShell":"npm --version"} --></li>
  <li>Find the Node.js executable:
    <pre><code class="language-shell">command -v node</code></pre>
    <!-- step {"stepId":"path","runShell":"command -v node"} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Jump ahead after a warning
==========================

.. test {"testId":"data-route-onwarning-gotostep","detectSteps":true}

#. Print the Node.js version:

   .. code-block:: shell

      node --version

   .. step {"runShell":"node --version","onWarning":[{"goToStep":"path"}]}

#. Print the npm version:

   .. code-block:: shell

      npm --version

   .. step {"stepId":"npm","runShell":"npm --version"}

#. Find the Node.js executable:

   .. code-block:: shell

      command -v node

   .. step {"stepId":"path","runShell":"command -v node"}

.. test end
```

#### DITA

**`detected.dita`**

```xml title="detected.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="data-route-onwarning-gotostep">
  <title>Jump ahead after a warning</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"data-route-onwarning-gotostep","detectSteps":true}'/>
    <steps>
      <step><cmd>Print the Node.js version:</cmd>
        <info><codeblock outputclass="language-shell">node --version</codeblock>
          <data name="doc-detective" value='step {"runShell":"node --version","onWarning":[{"goToStep":"path"}]}'/></info></step>
      <step><cmd>Print the npm version:</cmd>
        <info><codeblock outputclass="language-shell">npm --version</codeblock>
          <data name="doc-detective" value='step {"stepId":"npm","runShell":"npm --version"}'/></info></step>
      <step><cmd>Find the Node.js executable:</cmd>
        <info><codeblock outputclass="language-shell">command -v node</codeblock>
          <data name="doc-detective" value='step {"stepId":"path","runShell":"command -v node"}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Inline

#### Markdown

**`inline.md`**

````markdown title="inline.md"
<!-- test {"testId":"data-route-onwarning-gotostep","detectSteps":false} -->

# Jump ahead after a warning

1. Print the Node.js version:

   ```shell
   node --version
   ```
   <!-- step {"runShell":"node --version","onWarning":[{"goToStep":"path"}]} -->
2. Print the npm version:

   ```shell
   npm --version
   ```
   <!-- step {"stepId":"npm","runShell":"npm --version"} -->
3. Find the Node.js executable:

   ```shell
   command -v node
   ```
   <!-- step {"stepId":"path","runShell":"command -v node"} -->

<!-- test end -->
````

#### MDX

**`inline.mdx`**

````mdx title="inline.mdx"
{/* test {"testId":"data-route-onwarning-gotostep","detectSteps":false} */}

# Jump ahead after a warning

1. Print the Node.js version:

   ```shell
   node --version
   ```
   {/* step {"runShell":"node --version","onWarning":[{"goToStep":"path"}]} */}
2. Print the npm version:

   ```shell
   npm --version
   ```
   {/* step {"stepId":"npm","runShell":"npm --version"} */}
3. Find the Node.js executable:

   ```shell
   command -v node
   ```
   {/* step {"stepId":"path","runShell":"command -v node"} */}

{/* test end */}
````

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Jump ahead after a warning

// (test {"testId":"data-route-onwarning-gotostep","detectSteps":false})

. Print the Node.js version:
+
[source,shell]
----
node --version
----
+
// (step {"runShell":"node --version","onWarning":[{"goToStep":"path"}]})
. Print the npm version:
+
[source,shell]
----
npm --version
----
+
// (step {"stepId":"npm","runShell":"npm --version"})
. Find the Node.js executable:
+
[source,shell]
----
command -v node
----
+
// (step {"stepId":"path","runShell":"command -v node"})

// (test end)
```

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Jump ahead after a warning</title></head>
<body>
<!-- test {"testId":"data-route-onwarning-gotostep","detectSteps":false} -->
<h1>Jump ahead after a warning</h1>
<ol>
  <li>Print the Node.js version:
    <pre><code class="language-shell">node --version</code></pre>
    <!-- step {"runShell":"node --version","onWarning":[{"goToStep":"path"}]} --></li>
  <li>Print the npm version:
    <pre><code class="language-shell">npm --version</code></pre>
    <!-- step {"stepId":"npm","runShell":"npm --version"} --></li>
  <li>Find the Node.js executable:
    <pre><code class="language-shell">command -v node</code></pre>
    <!-- step {"stepId":"path","runShell":"command -v node"} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Jump ahead after a warning
==========================

.. test {"testId":"data-route-onwarning-gotostep","detectSteps":false}

#. Print the Node.js version:

   .. code-block:: shell

      node --version

   .. step {"runShell":"node --version","onWarning":[{"goToStep":"path"}]}

#. Print the npm version:

   .. code-block:: shell

      npm --version

   .. step {"stepId":"npm","runShell":"npm --version"}

#. Find the Node.js executable:

   .. code-block:: shell

      command -v node

   .. step {"stepId":"path","runShell":"command -v node"}

.. test end
```

#### DITA

**`inline.dita`**

```xml title="inline.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="data-route-onwarning-gotostep">
  <title>Jump ahead after a warning</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"data-route-onwarning-gotostep","detectSteps":false}'/>
    <steps>
      <step><cmd>Print the Node.js version:</cmd>
        <info><codeblock outputclass="language-shell">node --version</codeblock>
          <data name="doc-detective" value='step {"runShell":"node --version","onWarning":[{"goToStep":"path"}]}'/></info></step>
      <step><cmd>Print the npm version:</cmd>
        <info><codeblock outputclass="language-shell">npm --version</codeblock>
          <data name="doc-detective" value='step {"stepId":"npm","runShell":"npm --version"}'/></info></step>
      <step><cmd>Find the Node.js executable:</cmd>
        <info><codeblock outputclass="language-shell">command -v node</codeblock>
          <data name="doc-detective" value='step {"stepId":"path","runShell":"command -v node"}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "data-route-onwarning-gotostep",
      "steps": [
        {
          "runShell": "node --version",
          "onWarning": [
            {
              "goToStep": "path"
            }
          ]
        },
        {
          "stepId": "npm",
          "runShell": "npm --version"
        },
        {
          "stepId": "path",
          "runShell": "command -v node"
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: data-route-onwarning-gotostep
    steps:
      - runShell: node --version
        onWarning:
          - goToStep: path
      - stepId: npm
        runShell: npm --version
      - stepId: path
        runShell: command -v node
```

### `onWarning`, `retry`

**Varies:** `step.onWarning` · **Value:** `[{"retry": {"limit": 1}}]` · **Effect:** applies only if the step ends with a warning, and runs it again. Here the step passes.

#### Prose

#### Markdown

**`prose.md`**

````markdown title="prose.md"
# Retry after a warning

1. Print the Node.js version:

   ```shell
   node --version
   ```
2. Print the npm version:

   ```shell
   npm --version
   ```
````

#### MDX

**`prose.mdx`**

````mdx title="prose.mdx"
# Retry after a warning

1. Print the Node.js version:

   ```shell
   node --version
   ```
2. Print the npm version:

   ```shell
   npm --version
   ```
````

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Retry after a warning

. Print the Node.js version:
+
[source,shell]
----
node --version
----
. Print the npm version:
+
[source,shell]
----
npm --version
----
```

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Retry after a warning</title></head>
<body>
<h1>Retry after a warning</h1>
<ol>
  <li>Print the Node.js version:
    <pre><code class="language-shell">node --version</code></pre></li>
  <li>Print the npm version:
    <pre><code class="language-shell">npm --version</code></pre></li>
</ol>
</body>
</html>
```

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Retry after a warning
=====================

#. Print the Node.js version:

   .. code-block:: shell

      node --version

#. Print the npm version:

   .. code-block:: shell

      npm --version
```

#### DITA

**`prose.dita`**

```xml title="prose.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="data-route-onwarning-retry">
  <title>Retry after a warning</title>
  <taskbody>
    <steps>
      <step><cmd>Print the Node.js version:</cmd>
        <info><codeblock outputclass="language-shell">node --version</codeblock></info></step>
      <step><cmd>Print the npm version:</cmd>
        <info><codeblock outputclass="language-shell">npm --version</codeblock></info></step>
    </steps>
  </taskbody>
</task>
```

#### Detected

#### Markdown

**`detected.md`**

````markdown title="detected.md"
<!-- test {"testId":"data-route-onwarning-retry","detectSteps":true} -->

# Retry after a warning

1. Print the Node.js version:

   ```shell
   node --version
   ```
   <!-- step {"runShell":"node --version","onWarning":[{"retry":{"limit":1}}]} -->
2. Print the npm version:

   ```shell
   npm --version
   ```
   <!-- step {"stepId":"npm","runShell":"npm --version"} -->

<!-- test end -->
````

#### MDX

**`detected.mdx`**

````mdx title="detected.mdx"
{/* test {"testId":"data-route-onwarning-retry","detectSteps":true} */}

# Retry after a warning

1. Print the Node.js version:

   ```shell
   node --version
   ```
   {/* step {"runShell":"node --version","onWarning":[{"retry":{"limit":1}}]} */}
2. Print the npm version:

   ```shell
   npm --version
   ```
   {/* step {"stepId":"npm","runShell":"npm --version"} */}

{/* test end */}
````

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Retry after a warning

// (test {"testId":"data-route-onwarning-retry","detectSteps":true})

. Print the Node.js version:
+
[source,shell]
----
node --version
----
+
// (step {"runShell":"node --version","onWarning":[{"retry":{"limit":1}}]})
. Print the npm version:
+
[source,shell]
----
npm --version
----
+
// (step {"stepId":"npm","runShell":"npm --version"})

// (test end)
```

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Retry after a warning</title></head>
<body>
<!-- test {"testId":"data-route-onwarning-retry","detectSteps":true} -->
<h1>Retry after a warning</h1>
<ol>
  <li>Print the Node.js version:
    <pre><code class="language-shell">node --version</code></pre>
    <!-- step {"runShell":"node --version","onWarning":[{"retry":{"limit":1}}]} --></li>
  <li>Print the npm version:
    <pre><code class="language-shell">npm --version</code></pre>
    <!-- step {"stepId":"npm","runShell":"npm --version"} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Retry after a warning
=====================

.. test {"testId":"data-route-onwarning-retry","detectSteps":true}

#. Print the Node.js version:

   .. code-block:: shell

      node --version

   .. step {"runShell":"node --version","onWarning":[{"retry":{"limit":1}}]}

#. Print the npm version:

   .. code-block:: shell

      npm --version

   .. step {"stepId":"npm","runShell":"npm --version"}

.. test end
```

#### DITA

**`detected.dita`**

```xml title="detected.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="data-route-onwarning-retry">
  <title>Retry after a warning</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"data-route-onwarning-retry","detectSteps":true}'/>
    <steps>
      <step><cmd>Print the Node.js version:</cmd>
        <info><codeblock outputclass="language-shell">node --version</codeblock>
          <data name="doc-detective" value='step {"runShell":"node --version","onWarning":[{"retry":{"limit":1}}]}'/></info></step>
      <step><cmd>Print the npm version:</cmd>
        <info><codeblock outputclass="language-shell">npm --version</codeblock>
          <data name="doc-detective" value='step {"stepId":"npm","runShell":"npm --version"}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Inline

#### Markdown

**`inline.md`**

````markdown title="inline.md"
<!-- test {"testId":"data-route-onwarning-retry","detectSteps":false} -->

# Retry after a warning

1. Print the Node.js version:

   ```shell
   node --version
   ```
   <!-- step {"runShell":"node --version","onWarning":[{"retry":{"limit":1}}]} -->
2. Print the npm version:

   ```shell
   npm --version
   ```
   <!-- step {"stepId":"npm","runShell":"npm --version"} -->

<!-- test end -->
````

#### MDX

**`inline.mdx`**

````mdx title="inline.mdx"
{/* test {"testId":"data-route-onwarning-retry","detectSteps":false} */}

# Retry after a warning

1. Print the Node.js version:

   ```shell
   node --version
   ```
   {/* step {"runShell":"node --version","onWarning":[{"retry":{"limit":1}}]} */}
2. Print the npm version:

   ```shell
   npm --version
   ```
   {/* step {"stepId":"npm","runShell":"npm --version"} */}

{/* test end */}
````

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Retry after a warning

// (test {"testId":"data-route-onwarning-retry","detectSteps":false})

. Print the Node.js version:
+
[source,shell]
----
node --version
----
+
// (step {"runShell":"node --version","onWarning":[{"retry":{"limit":1}}]})
. Print the npm version:
+
[source,shell]
----
npm --version
----
+
// (step {"stepId":"npm","runShell":"npm --version"})

// (test end)
```

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Retry after a warning</title></head>
<body>
<!-- test {"testId":"data-route-onwarning-retry","detectSteps":false} -->
<h1>Retry after a warning</h1>
<ol>
  <li>Print the Node.js version:
    <pre><code class="language-shell">node --version</code></pre>
    <!-- step {"runShell":"node --version","onWarning":[{"retry":{"limit":1}}]} --></li>
  <li>Print the npm version:
    <pre><code class="language-shell">npm --version</code></pre>
    <!-- step {"stepId":"npm","runShell":"npm --version"} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Retry after a warning
=====================

.. test {"testId":"data-route-onwarning-retry","detectSteps":false}

#. Print the Node.js version:

   .. code-block:: shell

      node --version

   .. step {"runShell":"node --version","onWarning":[{"retry":{"limit":1}}]}

#. Print the npm version:

   .. code-block:: shell

      npm --version

   .. step {"stepId":"npm","runShell":"npm --version"}

.. test end
```

#### DITA

**`inline.dita`**

```xml title="inline.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="data-route-onwarning-retry">
  <title>Retry after a warning</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"data-route-onwarning-retry","detectSteps":false}'/>
    <steps>
      <step><cmd>Print the Node.js version:</cmd>
        <info><codeblock outputclass="language-shell">node --version</codeblock>
          <data name="doc-detective" value='step {"runShell":"node --version","onWarning":[{"retry":{"limit":1}}]}'/></info></step>
      <step><cmd>Print the npm version:</cmd>
        <info><codeblock outputclass="language-shell">npm --version</codeblock>
          <data name="doc-detective" value='step {"stepId":"npm","runShell":"npm --version"}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "data-route-onwarning-retry",
      "steps": [
        {
          "runShell": "node --version",
          "onWarning": [
            {
              "retry": {
                "limit": 1
              }
            }
          ]
        },
        {
          "stepId": "npm",
          "runShell": "npm --version"
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: data-route-onwarning-retry
    steps:
      - runShell: node --version
        onWarning:
          - retry:
              limit: 1
      - stepId: npm
        runShell: npm --version
```

### Entry `if`, string

**Varies:** `step.onPass[].if` · **Value:** `"$$platform oneOf [linux, mac, windows]"` · **Effect:** the entry applies only when its condition is true. It's true here, so the step jumps to `path`.

#### Prose

#### Markdown

**`prose.md`**

````markdown title="prose.md"
# Skip ahead on desktop platforms

1. Print the Node.js version:

   ```shell
   node --version
   ```
2. Print the npm version:

   ```shell
   npm --version
   ```
3. Find the Node.js executable:

   ```shell
   command -v node
   ```
````

#### MDX

**`prose.mdx`**

````mdx title="prose.mdx"
# Skip ahead on desktop platforms

1. Print the Node.js version:

   ```shell
   node --version
   ```
2. Print the npm version:

   ```shell
   npm --version
   ```
3. Find the Node.js executable:

   ```shell
   command -v node
   ```
````

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Skip ahead on desktop platforms

. Print the Node.js version:
+
[source,shell]
----
node --version
----
. Print the npm version:
+
[source,shell]
----
npm --version
----
. Find the Node.js executable:
+
[source,shell]
----
command -v node
----
```

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Skip ahead on desktop platforms</title></head>
<body>
<h1>Skip ahead on desktop platforms</h1>
<ol>
  <li>Print the Node.js version:
    <pre><code class="language-shell">node --version</code></pre></li>
  <li>Print the npm version:
    <pre><code class="language-shell">npm --version</code></pre></li>
  <li>Find the Node.js executable:
    <pre><code class="language-shell">command -v node</code></pre></li>
</ol>
</body>
</html>
```

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Skip ahead on desktop platforms
===============================

#. Print the Node.js version:

   .. code-block:: shell

      node --version

#. Print the npm version:

   .. code-block:: shell

      npm --version

#. Find the Node.js executable:

   .. code-block:: shell

      command -v node
```

#### DITA

**`prose.dita`**

```xml title="prose.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="data-route-if-string">
  <title>Skip ahead on desktop platforms</title>
  <taskbody>
    <steps>
      <step><cmd>Print the Node.js version:</cmd>
        <info><codeblock outputclass="language-shell">node --version</codeblock></info></step>
      <step><cmd>Print the npm version:</cmd>
        <info><codeblock outputclass="language-shell">npm --version</codeblock></info></step>
      <step><cmd>Find the Node.js executable:</cmd>
        <info><codeblock outputclass="language-shell">command -v node</codeblock></info></step>
    </steps>
  </taskbody>
</task>
```

#### Detected

#### Markdown

**`detected.md`**

````markdown title="detected.md"
<!-- test {"testId":"data-route-if-string","detectSteps":true} -->

# Skip ahead on desktop platforms

1. Print the Node.js version:

   ```shell
   node --version
   ```
   <!-- step {"runShell":"node --version","onPass":[{"if":"$$platform oneOf [linux, mac, windows]","goToStep":"path"}]} -->
2. Print the npm version:

   ```shell
   npm --version
   ```
   <!-- step {"stepId":"npm","runShell":"npm --version"} -->
3. Find the Node.js executable:

   ```shell
   command -v node
   ```
   <!-- step {"stepId":"path","runShell":"command -v node"} -->

<!-- test end -->
````

#### MDX

**`detected.mdx`**

````mdx title="detected.mdx"
{/* test {"testId":"data-route-if-string","detectSteps":true} */}

# Skip ahead on desktop platforms

1. Print the Node.js version:

   ```shell
   node --version
   ```
   {/* step {"runShell":"node --version","onPass":[{"if":"$$platform oneOf [linux, mac, windows]","goToStep":"path"}]} */}
2. Print the npm version:

   ```shell
   npm --version
   ```
   {/* step {"stepId":"npm","runShell":"npm --version"} */}
3. Find the Node.js executable:

   ```shell
   command -v node
   ```
   {/* step {"stepId":"path","runShell":"command -v node"} */}

{/* test end */}
````

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Skip ahead on desktop platforms

// (test {"testId":"data-route-if-string","detectSteps":true})

. Print the Node.js version:
+
[source,shell]
----
node --version
----
+
// (step {"runShell":"node --version","onPass":[{"if":"$$platform oneOf [linux, mac, windows]","goToStep":"path"}]})
. Print the npm version:
+
[source,shell]
----
npm --version
----
+
// (step {"stepId":"npm","runShell":"npm --version"})
. Find the Node.js executable:
+
[source,shell]
----
command -v node
----
+
// (step {"stepId":"path","runShell":"command -v node"})

// (test end)
```

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Skip ahead on desktop platforms</title></head>
<body>
<!-- test {"testId":"data-route-if-string","detectSteps":true} -->
<h1>Skip ahead on desktop platforms</h1>
<ol>
  <li>Print the Node.js version:
    <pre><code class="language-shell">node --version</code></pre>
    <!-- step {"runShell":"node --version","onPass":[{"if":"$$platform oneOf [linux, mac, windows]","goToStep":"path"}]} --></li>
  <li>Print the npm version:
    <pre><code class="language-shell">npm --version</code></pre>
    <!-- step {"stepId":"npm","runShell":"npm --version"} --></li>
  <li>Find the Node.js executable:
    <pre><code class="language-shell">command -v node</code></pre>
    <!-- step {"stepId":"path","runShell":"command -v node"} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Skip ahead on desktop platforms
===============================

.. test {"testId":"data-route-if-string","detectSteps":true}

#. Print the Node.js version:

   .. code-block:: shell

      node --version

   .. step {"runShell":"node --version","onPass":[{"if":"$$platform oneOf [linux, mac, windows]","goToStep":"path"}]}

#. Print the npm version:

   .. code-block:: shell

      npm --version

   .. step {"stepId":"npm","runShell":"npm --version"}

#. Find the Node.js executable:

   .. code-block:: shell

      command -v node

   .. step {"stepId":"path","runShell":"command -v node"}

.. test end
```

#### DITA

**`detected.dita`**

```xml title="detected.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="data-route-if-string">
  <title>Skip ahead on desktop platforms</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"data-route-if-string","detectSteps":true}'/>
    <steps>
      <step><cmd>Print the Node.js version:</cmd>
        <info><codeblock outputclass="language-shell">node --version</codeblock>
          <data name="doc-detective" value='step {"runShell":"node --version","onPass":[{"if":"$$platform oneOf [linux, mac, windows]","goToStep":"path"}]}'/></info></step>
      <step><cmd>Print the npm version:</cmd>
        <info><codeblock outputclass="language-shell">npm --version</codeblock>
          <data name="doc-detective" value='step {"stepId":"npm","runShell":"npm --version"}'/></info></step>
      <step><cmd>Find the Node.js executable:</cmd>
        <info><codeblock outputclass="language-shell">command -v node</codeblock>
          <data name="doc-detective" value='step {"stepId":"path","runShell":"command -v node"}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Inline

#### Markdown

**`inline.md`**

````markdown title="inline.md"
<!-- test {"testId":"data-route-if-string","detectSteps":false} -->

# Skip ahead on desktop platforms

1. Print the Node.js version:

   ```shell
   node --version
   ```
   <!-- step {"runShell":"node --version","onPass":[{"if":"$$platform oneOf [linux, mac, windows]","goToStep":"path"}]} -->
2. Print the npm version:

   ```shell
   npm --version
   ```
   <!-- step {"stepId":"npm","runShell":"npm --version"} -->
3. Find the Node.js executable:

   ```shell
   command -v node
   ```
   <!-- step {"stepId":"path","runShell":"command -v node"} -->

<!-- test end -->
````

#### MDX

**`inline.mdx`**

````mdx title="inline.mdx"
{/* test {"testId":"data-route-if-string","detectSteps":false} */}

# Skip ahead on desktop platforms

1. Print the Node.js version:

   ```shell
   node --version
   ```
   {/* step {"runShell":"node --version","onPass":[{"if":"$$platform oneOf [linux, mac, windows]","goToStep":"path"}]} */}
2. Print the npm version:

   ```shell
   npm --version
   ```
   {/* step {"stepId":"npm","runShell":"npm --version"} */}
3. Find the Node.js executable:

   ```shell
   command -v node
   ```
   {/* step {"stepId":"path","runShell":"command -v node"} */}

{/* test end */}
````

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Skip ahead on desktop platforms

// (test {"testId":"data-route-if-string","detectSteps":false})

. Print the Node.js version:
+
[source,shell]
----
node --version
----
+
// (step {"runShell":"node --version","onPass":[{"if":"$$platform oneOf [linux, mac, windows]","goToStep":"path"}]})
. Print the npm version:
+
[source,shell]
----
npm --version
----
+
// (step {"stepId":"npm","runShell":"npm --version"})
. Find the Node.js executable:
+
[source,shell]
----
command -v node
----
+
// (step {"stepId":"path","runShell":"command -v node"})

// (test end)
```

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Skip ahead on desktop platforms</title></head>
<body>
<!-- test {"testId":"data-route-if-string","detectSteps":false} -->
<h1>Skip ahead on desktop platforms</h1>
<ol>
  <li>Print the Node.js version:
    <pre><code class="language-shell">node --version</code></pre>
    <!-- step {"runShell":"node --version","onPass":[{"if":"$$platform oneOf [linux, mac, windows]","goToStep":"path"}]} --></li>
  <li>Print the npm version:
    <pre><code class="language-shell">npm --version</code></pre>
    <!-- step {"stepId":"npm","runShell":"npm --version"} --></li>
  <li>Find the Node.js executable:
    <pre><code class="language-shell">command -v node</code></pre>
    <!-- step {"stepId":"path","runShell":"command -v node"} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Skip ahead on desktop platforms
===============================

.. test {"testId":"data-route-if-string","detectSteps":false}

#. Print the Node.js version:

   .. code-block:: shell

      node --version

   .. step {"runShell":"node --version","onPass":[{"if":"$$platform oneOf [linux, mac, windows]","goToStep":"path"}]}

#. Print the npm version:

   .. code-block:: shell

      npm --version

   .. step {"stepId":"npm","runShell":"npm --version"}

#. Find the Node.js executable:

   .. code-block:: shell

      command -v node

   .. step {"stepId":"path","runShell":"command -v node"}

.. test end
```

#### DITA

**`inline.dita`**

```xml title="inline.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="data-route-if-string">
  <title>Skip ahead on desktop platforms</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"data-route-if-string","detectSteps":false}'/>
    <steps>
      <step><cmd>Print the Node.js version:</cmd>
        <info><codeblock outputclass="language-shell">node --version</codeblock>
          <data name="doc-detective" value='step {"runShell":"node --version","onPass":[{"if":"$$platform oneOf [linux, mac, windows]","goToStep":"path"}]}'/></info></step>
      <step><cmd>Print the npm version:</cmd>
        <info><codeblock outputclass="language-shell">npm --version</codeblock>
          <data name="doc-detective" value='step {"stepId":"npm","runShell":"npm --version"}'/></info></step>
      <step><cmd>Find the Node.js executable:</cmd>
        <info><codeblock outputclass="language-shell">command -v node</codeblock>
          <data name="doc-detective" value='step {"stepId":"path","runShell":"command -v node"}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "data-route-if-string",
      "steps": [
        {
          "runShell": "node --version",
          "onPass": [
            {
              "if": "$$platform oneOf [linux, mac, windows]",
              "goToStep": "path"
            }
          ]
        },
        {
          "stepId": "npm",
          "runShell": "npm --version"
        },
        {
          "stepId": "path",
          "runShell": "command -v node"
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: data-route-if-string
    steps:
      - runShell: node --version
        onPass:
          - if: $$platform oneOf [linux, mac, windows]
            goToStep: path
      - stepId: npm
        runShell: npm --version
      - stepId: path
        runShell: command -v node
```

### Entry `if`, array

**Varies:** `step.onPass[].if` · **Value:** `["$$outputs.exitCode == 0", "$$outputs.stdio.stdout matches /^v/"]` · **Effect:** every condition must be true. An entry's condition reads the step's own `$$outputs`.

#### Prose

#### Markdown

**`prose.md`**

````markdown title="prose.md"
# Skip ahead after a valid version

1. Print the Node.js version:

   ```shell
   node --version
   ```
2. Print the npm version:

   ```shell
   npm --version
   ```
3. Find the Node.js executable:

   ```shell
   command -v node
   ```
````

#### MDX

**`prose.mdx`**

````mdx title="prose.mdx"
# Skip ahead after a valid version

1. Print the Node.js version:

   ```shell
   node --version
   ```
2. Print the npm version:

   ```shell
   npm --version
   ```
3. Find the Node.js executable:

   ```shell
   command -v node
   ```
````

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Skip ahead after a valid version

. Print the Node.js version:
+
[source,shell]
----
node --version
----
. Print the npm version:
+
[source,shell]
----
npm --version
----
. Find the Node.js executable:
+
[source,shell]
----
command -v node
----
```

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Skip ahead after a valid version</title></head>
<body>
<h1>Skip ahead after a valid version</h1>
<ol>
  <li>Print the Node.js version:
    <pre><code class="language-shell">node --version</code></pre></li>
  <li>Print the npm version:
    <pre><code class="language-shell">npm --version</code></pre></li>
  <li>Find the Node.js executable:
    <pre><code class="language-shell">command -v node</code></pre></li>
</ol>
</body>
</html>
```

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Skip ahead after a valid version
================================

#. Print the Node.js version:

   .. code-block:: shell

      node --version

#. Print the npm version:

   .. code-block:: shell

      npm --version

#. Find the Node.js executable:

   .. code-block:: shell

      command -v node
```

#### DITA

**`prose.dita`**

```xml title="prose.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="data-route-if-array">
  <title>Skip ahead after a valid version</title>
  <taskbody>
    <steps>
      <step><cmd>Print the Node.js version:</cmd>
        <info><codeblock outputclass="language-shell">node --version</codeblock></info></step>
      <step><cmd>Print the npm version:</cmd>
        <info><codeblock outputclass="language-shell">npm --version</codeblock></info></step>
      <step><cmd>Find the Node.js executable:</cmd>
        <info><codeblock outputclass="language-shell">command -v node</codeblock></info></step>
    </steps>
  </taskbody>
</task>
```

#### Detected

#### Markdown

**`detected.md`**

````markdown title="detected.md"
<!-- test {"testId":"data-route-if-array","detectSteps":true} -->

# Skip ahead after a valid version

1. Print the Node.js version:

   ```shell
   node --version
   ```
   <!-- step {"runShell":"node --version","onPass":[{"if":["$$outputs.exitCode == 0","$$outputs.stdio.stdout matches /^v/"],"goToStep":"path"}]} -->
2. Print the npm version:

   ```shell
   npm --version
   ```
   <!-- step {"stepId":"npm","runShell":"npm --version"} -->
3. Find the Node.js executable:

   ```shell
   command -v node
   ```
   <!-- step {"stepId":"path","runShell":"command -v node"} -->

<!-- test end -->
````

#### MDX

**`detected.mdx`**

````mdx title="detected.mdx"
{/* test {"testId":"data-route-if-array","detectSteps":true} */}

# Skip ahead after a valid version

1. Print the Node.js version:

   ```shell
   node --version
   ```
   {/* step {"runShell":"node --version","onPass":[{"if":["$$outputs.exitCode == 0","$$outputs.stdio.stdout matches /^v/"],"goToStep":"path"}]} */}
2. Print the npm version:

   ```shell
   npm --version
   ```
   {/* step {"stepId":"npm","runShell":"npm --version"} */}
3. Find the Node.js executable:

   ```shell
   command -v node
   ```
   {/* step {"stepId":"path","runShell":"command -v node"} */}

{/* test end */}
````

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Skip ahead after a valid version

// (test {"testId":"data-route-if-array","detectSteps":true})

. Print the Node.js version:
+
[source,shell]
----
node --version
----
+
// (step {"runShell":"node --version","onPass":[{"if":["$$outputs.exitCode == 0","$$outputs.stdio.stdout matches /^v/"],"goToStep":"path"}]})
. Print the npm version:
+
[source,shell]
----
npm --version
----
+
// (step {"stepId":"npm","runShell":"npm --version"})
. Find the Node.js executable:
+
[source,shell]
----
command -v node
----
+
// (step {"stepId":"path","runShell":"command -v node"})

// (test end)
```

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Skip ahead after a valid version</title></head>
<body>
<!-- test {"testId":"data-route-if-array","detectSteps":true} -->
<h1>Skip ahead after a valid version</h1>
<ol>
  <li>Print the Node.js version:
    <pre><code class="language-shell">node --version</code></pre>
    <!-- step {"runShell":"node --version","onPass":[{"if":["$$outputs.exitCode == 0","$$outputs.stdio.stdout matches /^v/"],"goToStep":"path"}]} --></li>
  <li>Print the npm version:
    <pre><code class="language-shell">npm --version</code></pre>
    <!-- step {"stepId":"npm","runShell":"npm --version"} --></li>
  <li>Find the Node.js executable:
    <pre><code class="language-shell">command -v node</code></pre>
    <!-- step {"stepId":"path","runShell":"command -v node"} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Skip ahead after a valid version
================================

.. test {"testId":"data-route-if-array","detectSteps":true}

#. Print the Node.js version:

   .. code-block:: shell

      node --version

   .. step {"runShell":"node --version","onPass":[{"if":["$$outputs.exitCode == 0","$$outputs.stdio.stdout matches /^v/"],"goToStep":"path"}]}

#. Print the npm version:

   .. code-block:: shell

      npm --version

   .. step {"stepId":"npm","runShell":"npm --version"}

#. Find the Node.js executable:

   .. code-block:: shell

      command -v node

   .. step {"stepId":"path","runShell":"command -v node"}

.. test end
```

#### DITA

**`detected.dita`**

```xml title="detected.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="data-route-if-array">
  <title>Skip ahead after a valid version</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"data-route-if-array","detectSteps":true}'/>
    <steps>
      <step><cmd>Print the Node.js version:</cmd>
        <info><codeblock outputclass="language-shell">node --version</codeblock>
          <data name="doc-detective" value='step {"runShell":"node --version","onPass":[{"if":["$$outputs.exitCode == 0","$$outputs.stdio.stdout matches /^v/"],"goToStep":"path"}]}'/></info></step>
      <step><cmd>Print the npm version:</cmd>
        <info><codeblock outputclass="language-shell">npm --version</codeblock>
          <data name="doc-detective" value='step {"stepId":"npm","runShell":"npm --version"}'/></info></step>
      <step><cmd>Find the Node.js executable:</cmd>
        <info><codeblock outputclass="language-shell">command -v node</codeblock>
          <data name="doc-detective" value='step {"stepId":"path","runShell":"command -v node"}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Inline

#### Markdown

**`inline.md`**

````markdown title="inline.md"
<!-- test {"testId":"data-route-if-array","detectSteps":false} -->

# Skip ahead after a valid version

1. Print the Node.js version:

   ```shell
   node --version
   ```
   <!-- step {"runShell":"node --version","onPass":[{"if":["$$outputs.exitCode == 0","$$outputs.stdio.stdout matches /^v/"],"goToStep":"path"}]} -->
2. Print the npm version:

   ```shell
   npm --version
   ```
   <!-- step {"stepId":"npm","runShell":"npm --version"} -->
3. Find the Node.js executable:

   ```shell
   command -v node
   ```
   <!-- step {"stepId":"path","runShell":"command -v node"} -->

<!-- test end -->
````

#### MDX

**`inline.mdx`**

````mdx title="inline.mdx"
{/* test {"testId":"data-route-if-array","detectSteps":false} */}

# Skip ahead after a valid version

1. Print the Node.js version:

   ```shell
   node --version
   ```
   {/* step {"runShell":"node --version","onPass":[{"if":["$$outputs.exitCode == 0","$$outputs.stdio.stdout matches /^v/"],"goToStep":"path"}]} */}
2. Print the npm version:

   ```shell
   npm --version
   ```
   {/* step {"stepId":"npm","runShell":"npm --version"} */}
3. Find the Node.js executable:

   ```shell
   command -v node
   ```
   {/* step {"stepId":"path","runShell":"command -v node"} */}

{/* test end */}
````

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Skip ahead after a valid version

// (test {"testId":"data-route-if-array","detectSteps":false})

. Print the Node.js version:
+
[source,shell]
----
node --version
----
+
// (step {"runShell":"node --version","onPass":[{"if":["$$outputs.exitCode == 0","$$outputs.stdio.stdout matches /^v/"],"goToStep":"path"}]})
. Print the npm version:
+
[source,shell]
----
npm --version
----
+
// (step {"stepId":"npm","runShell":"npm --version"})
. Find the Node.js executable:
+
[source,shell]
----
command -v node
----
+
// (step {"stepId":"path","runShell":"command -v node"})

// (test end)
```

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Skip ahead after a valid version</title></head>
<body>
<!-- test {"testId":"data-route-if-array","detectSteps":false} -->
<h1>Skip ahead after a valid version</h1>
<ol>
  <li>Print the Node.js version:
    <pre><code class="language-shell">node --version</code></pre>
    <!-- step {"runShell":"node --version","onPass":[{"if":["$$outputs.exitCode == 0","$$outputs.stdio.stdout matches /^v/"],"goToStep":"path"}]} --></li>
  <li>Print the npm version:
    <pre><code class="language-shell">npm --version</code></pre>
    <!-- step {"stepId":"npm","runShell":"npm --version"} --></li>
  <li>Find the Node.js executable:
    <pre><code class="language-shell">command -v node</code></pre>
    <!-- step {"stepId":"path","runShell":"command -v node"} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Skip ahead after a valid version
================================

.. test {"testId":"data-route-if-array","detectSteps":false}

#. Print the Node.js version:

   .. code-block:: shell

      node --version

   .. step {"runShell":"node --version","onPass":[{"if":["$$outputs.exitCode == 0","$$outputs.stdio.stdout matches /^v/"],"goToStep":"path"}]}

#. Print the npm version:

   .. code-block:: shell

      npm --version

   .. step {"stepId":"npm","runShell":"npm --version"}

#. Find the Node.js executable:

   .. code-block:: shell

      command -v node

   .. step {"stepId":"path","runShell":"command -v node"}

.. test end
```

#### DITA

**`inline.dita`**

```xml title="inline.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="data-route-if-array">
  <title>Skip ahead after a valid version</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"data-route-if-array","detectSteps":false}'/>
    <steps>
      <step><cmd>Print the Node.js version:</cmd>
        <info><codeblock outputclass="language-shell">node --version</codeblock>
          <data name="doc-detective" value='step {"runShell":"node --version","onPass":[{"if":["$$outputs.exitCode == 0","$$outputs.stdio.stdout matches /^v/"],"goToStep":"path"}]}'/></info></step>
      <step><cmd>Print the npm version:</cmd>
        <info><codeblock outputclass="language-shell">npm --version</codeblock>
          <data name="doc-detective" value='step {"stepId":"npm","runShell":"npm --version"}'/></info></step>
      <step><cmd>Find the Node.js executable:</cmd>
        <info><codeblock outputclass="language-shell">command -v node</codeblock>
          <data name="doc-detective" value='step {"stepId":"path","runShell":"command -v node"}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "data-route-if-array",
      "steps": [
        {
          "runShell": "node --version",
          "onPass": [
            {
              "if": [
                "$$outputs.exitCode == 0",
                "$$outputs.stdio.stdout matches /^v/"
              ],
              "goToStep": "path"
            }
          ]
        },
        {
          "stepId": "npm",
          "runShell": "npm --version"
        },
        {
          "stepId": "path",
          "runShell": "command -v node"
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: data-route-if-array
    steps:
      - runShell: node --version
        onPass:
          - if:
              - $$outputs.exitCode == 0
              - $$outputs.stdio.stdout matches /^v/
            goToStep: path
      - stepId: npm
        runShell: npm --version
      - stepId: path
        runShell: command -v node
```

### Entry `if`, false

**Varies:** `step.onPass[].if` · **Value:** `"$$outputs.exitCode != 0"` · **Effect:** the condition is false, so the entry doesn't apply and the default runs: the test continues to the npm step.

#### Prose

#### Markdown

**`prose.md`**

````markdown title="prose.md"
# Fall back to the default route

1. Print the Node.js version:

   ```shell
   node --version
   ```
2. Print the npm version:

   ```shell
   npm --version
   ```
````

#### MDX

**`prose.mdx`**

````mdx title="prose.mdx"
# Fall back to the default route

1. Print the Node.js version:

   ```shell
   node --version
   ```
2. Print the npm version:

   ```shell
   npm --version
   ```
````

#### AsciiDoc

**`prose.adoc`**

```asciidoc title="prose.adoc"
= Fall back to the default route

. Print the Node.js version:
+
[source,shell]
----
node --version
----
. Print the npm version:
+
[source,shell]
----
npm --version
----
```

#### HTML

**`prose.html`**

```html title="prose.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Fall back to the default route</title></head>
<body>
<h1>Fall back to the default route</h1>
<ol>
  <li>Print the Node.js version:
    <pre><code class="language-shell">node --version</code></pre></li>
  <li>Print the npm version:
    <pre><code class="language-shell">npm --version</code></pre></li>
</ol>
</body>
</html>
```

#### reStructuredText

**`prose.rst`**

```rst title="prose.rst"
Fall back to the default route
==============================

#. Print the Node.js version:

   .. code-block:: shell

      node --version

#. Print the npm version:

   .. code-block:: shell

      npm --version
```

#### DITA

**`prose.dita`**

```xml title="prose.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="data-route-if-false">
  <title>Fall back to the default route</title>
  <taskbody>
    <steps>
      <step><cmd>Print the Node.js version:</cmd>
        <info><codeblock outputclass="language-shell">node --version</codeblock></info></step>
      <step><cmd>Print the npm version:</cmd>
        <info><codeblock outputclass="language-shell">npm --version</codeblock></info></step>
    </steps>
  </taskbody>
</task>
```

#### Detected

#### Markdown

**`detected.md`**

````markdown title="detected.md"
<!-- test {"testId":"data-route-if-false","detectSteps":true} -->

# Fall back to the default route

1. Print the Node.js version:

   ```shell
   node --version
   ```
   <!-- step {"runShell":"node --version","onPass":[{"if":"$$outputs.exitCode != 0","stop":"test"}]} -->
2. Print the npm version:

   ```shell
   npm --version
   ```
   <!-- step {"stepId":"npm","runShell":"npm --version"} -->

<!-- test end -->
````

#### MDX

**`detected.mdx`**

````mdx title="detected.mdx"
{/* test {"testId":"data-route-if-false","detectSteps":true} */}

# Fall back to the default route

1. Print the Node.js version:

   ```shell
   node --version
   ```
   {/* step {"runShell":"node --version","onPass":[{"if":"$$outputs.exitCode != 0","stop":"test"}]} */}
2. Print the npm version:

   ```shell
   npm --version
   ```
   {/* step {"stepId":"npm","runShell":"npm --version"} */}

{/* test end */}
````

#### AsciiDoc

**`detected.adoc`**

```asciidoc title="detected.adoc"
= Fall back to the default route

// (test {"testId":"data-route-if-false","detectSteps":true})

. Print the Node.js version:
+
[source,shell]
----
node --version
----
+
// (step {"runShell":"node --version","onPass":[{"if":"$$outputs.exitCode != 0","stop":"test"}]})
. Print the npm version:
+
[source,shell]
----
npm --version
----
+
// (step {"stepId":"npm","runShell":"npm --version"})

// (test end)
```

#### HTML

**`detected.html`**

```html title="detected.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Fall back to the default route</title></head>
<body>
<!-- test {"testId":"data-route-if-false","detectSteps":true} -->
<h1>Fall back to the default route</h1>
<ol>
  <li>Print the Node.js version:
    <pre><code class="language-shell">node --version</code></pre>
    <!-- step {"runShell":"node --version","onPass":[{"if":"$$outputs.exitCode != 0","stop":"test"}]} --></li>
  <li>Print the npm version:
    <pre><code class="language-shell">npm --version</code></pre>
    <!-- step {"stepId":"npm","runShell":"npm --version"} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`detected.rst`**

```rst title="detected.rst"
Fall back to the default route
==============================

.. test {"testId":"data-route-if-false","detectSteps":true}

#. Print the Node.js version:

   .. code-block:: shell

      node --version

   .. step {"runShell":"node --version","onPass":[{"if":"$$outputs.exitCode != 0","stop":"test"}]}

#. Print the npm version:

   .. code-block:: shell

      npm --version

   .. step {"stepId":"npm","runShell":"npm --version"}

.. test end
```

#### DITA

**`detected.dita`**

```xml title="detected.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="data-route-if-false">
  <title>Fall back to the default route</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"data-route-if-false","detectSteps":true}'/>
    <steps>
      <step><cmd>Print the Node.js version:</cmd>
        <info><codeblock outputclass="language-shell">node --version</codeblock>
          <data name="doc-detective" value='step {"runShell":"node --version","onPass":[{"if":"$$outputs.exitCode != 0","stop":"test"}]}'/></info></step>
      <step><cmd>Print the npm version:</cmd>
        <info><codeblock outputclass="language-shell">npm --version</codeblock>
          <data name="doc-detective" value='step {"stepId":"npm","runShell":"npm --version"}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Inline

#### Markdown

**`inline.md`**

````markdown title="inline.md"
<!-- test {"testId":"data-route-if-false","detectSteps":false} -->

# Fall back to the default route

1. Print the Node.js version:

   ```shell
   node --version
   ```
   <!-- step {"runShell":"node --version","onPass":[{"if":"$$outputs.exitCode != 0","stop":"test"}]} -->
2. Print the npm version:

   ```shell
   npm --version
   ```
   <!-- step {"stepId":"npm","runShell":"npm --version"} -->

<!-- test end -->
````

#### MDX

**`inline.mdx`**

````mdx title="inline.mdx"
{/* test {"testId":"data-route-if-false","detectSteps":false} */}

# Fall back to the default route

1. Print the Node.js version:

   ```shell
   node --version
   ```
   {/* step {"runShell":"node --version","onPass":[{"if":"$$outputs.exitCode != 0","stop":"test"}]} */}
2. Print the npm version:

   ```shell
   npm --version
   ```
   {/* step {"stepId":"npm","runShell":"npm --version"} */}

{/* test end */}
````

#### AsciiDoc

**`inline.adoc`**

```asciidoc title="inline.adoc"
= Fall back to the default route

// (test {"testId":"data-route-if-false","detectSteps":false})

. Print the Node.js version:
+
[source,shell]
----
node --version
----
+
// (step {"runShell":"node --version","onPass":[{"if":"$$outputs.exitCode != 0","stop":"test"}]})
. Print the npm version:
+
[source,shell]
----
npm --version
----
+
// (step {"stepId":"npm","runShell":"npm --version"})

// (test end)
```

#### HTML

**`inline.html`**

```html title="inline.html"
<!DOCTYPE html>
<html lang="en">
<head><title>Fall back to the default route</title></head>
<body>
<!-- test {"testId":"data-route-if-false","detectSteps":false} -->
<h1>Fall back to the default route</h1>
<ol>
  <li>Print the Node.js version:
    <pre><code class="language-shell">node --version</code></pre>
    <!-- step {"runShell":"node --version","onPass":[{"if":"$$outputs.exitCode != 0","stop":"test"}]} --></li>
  <li>Print the npm version:
    <pre><code class="language-shell">npm --version</code></pre>
    <!-- step {"stepId":"npm","runShell":"npm --version"} --></li>
</ol>
<!-- test end -->
</body>
</html>
```

#### reStructuredText

**`inline.rst`**

```rst title="inline.rst"
Fall back to the default route
==============================

.. test {"testId":"data-route-if-false","detectSteps":false}

#. Print the Node.js version:

   .. code-block:: shell

      node --version

   .. step {"runShell":"node --version","onPass":[{"if":"$$outputs.exitCode != 0","stop":"test"}]}

#. Print the npm version:

   .. code-block:: shell

      npm --version

   .. step {"stepId":"npm","runShell":"npm --version"}

.. test end
```

#### DITA

**`inline.dita`**

```xml title="inline.dita"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="data-route-if-false">
  <title>Fall back to the default route</title>
  <taskbody>
    <data name="doc-detective" value='test {"testId":"data-route-if-false","detectSteps":false}'/>
    <steps>
      <step><cmd>Print the Node.js version:</cmd>
        <info><codeblock outputclass="language-shell">node --version</codeblock>
          <data name="doc-detective" value='step {"runShell":"node --version","onPass":[{"if":"$$outputs.exitCode != 0","stop":"test"}]}'/></info></step>
      <step><cmd>Print the npm version:</cmd>
        <info><codeblock outputclass="language-shell">npm --version</codeblock>
          <data name="doc-detective" value='step {"stepId":"npm","runShell":"npm --version"}'/></info></step>
    </steps>
    <data name="doc-detective" value="test end"/>
  </taskbody>
</task>
```

#### Standalone

#### JSON

**`standalone.spec.json`**

```json title="standalone.spec.json"
{
  "$schema": "https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json",
  "tests": [
    {
      "testId": "data-route-if-false",
      "steps": [
        {
          "runShell": "node --version",
          "onPass": [
            {
              "if": "$$outputs.exitCode != 0",
              "stop": "test"
            }
          ]
        },
        {
          "stepId": "npm",
          "runShell": "npm --version"
        }
      ]
    }
  ]
}
```

#### YAML

**`standalone.spec.yaml`**

```yaml title="standalone.spec.yaml"
# yaml-language-server: $schema=https://raw.githubusercontent.com/doc-detective/doc-detective/main/src/common/dist/schemas/spec_v3.schema.json
tests:
  - testId: data-route-if-false
    steps:
      - runShell: node --version
        onPass:
          - if: $$outputs.exitCode != 0
            stop: test
      - stepId: npm
        runShell: npm --version
```