Skip to content

Commit ab54c4c

Browse files
committed
Updated to MDX to use Tabs components
1 parent 9cde18d commit ab54c4c

File tree

2 files changed

+42
-19
lines changed

2 files changed

+42
-19
lines changed

docs/get-started/tutorials/set-up-your-test-environment.md

Lines changed: 0 additions & 19 deletions
This file was deleted.
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
description: Set up an environment for Doc Detective tests.
3+
---
4+
5+
import Tabs from "@theme/Tabs";
6+
import TabItem from "@theme/TabItem";
7+
8+
# Set up your test environment
9+
10+
You can use Doc Detective directly against your production site. For testing, it's often useful to set up a local HTML server to run your tests. There are many server options. Live Server is a free utility that creates a local server that monitors your files for changes and updates the browser window automatically.
11+
12+
1. Download [TestExamples.zip](./TestExamples.zip) and expand the file to your local disk.
13+
14+
1. Install and run a webserver. Running your tests against a local server allows you to make edits and see them in real time. Also, you need to serve the files in a web browser to experiment with video recording and other features.
15+
16+
Any web server will do, but here are a few easy options (unassociated with Doc Detective):
17+
18+
<Tabs>
19+
<TabItem value='python' label='Python'>
20+
To run a local server with Python, you can use the built-in `http.server` module:
21+
22+
```bash
23+
python -m http.server 8080
24+
```
25+
</TabItem>
26+
<TabItem value='node' label='Node.js'>
27+
To run a local server with Node.js, you can use the `http-server` package:
28+
29+
```bash
30+
npx http-server <path-to-expanded-test-examples>
31+
```
32+
</TabItem>
33+
<TabItem value='vscode' label='VSCode'>
34+
In VSCode, search for and install the [Live Server](https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer) extension. It gives you a local development server with live reload capability.
35+
36+
:::info
37+
You need to set the port number to `8080` in your VSCode settings to match the Doc Detective tutorials.
38+
:::
39+
</TabItem>
40+
</Tabs>
41+
42+
Once the server is started, you can open a browser window to `http://localhost:8080`. If you see a rendered page, you're ready to start testing!

0 commit comments

Comments
 (0)