Skip to content

Commit 3d4640a

Browse files
authored
Update README.md (#97)
To help make it clear how to use Shortest.
2 parents 5c298d7 + 778791e commit 3d4640a

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

README.md

+36
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,39 @@
1+
# Quick start
2+
3+
1. Install the Shortest package
4+
5+
```
6+
npm install @antiwork/shortest
7+
```
8+
9+
2. Write your first test
10+
11+
```
12+
import { define } from 'shortest'
13+
14+
define('Login Flow', () => {
15+
test('User can login')
16+
.given('I am on the login page')
17+
.when('I enter my credentials')
18+
.expect('I should be logged in')
19+
})
20+
```
21+
22+
3. Don't forget to add an API key:
23+
24+
```
25+
ANTHROPIC_API_KEY=your_api_key
26+
```
27+
28+
4. Run your tests with:
29+
30+
```
31+
shortest # to run all tests
32+
shortest login.test.ts # to run one test
33+
```
34+
35+
And you're done!
36+
137
# Shortest
238

339
**[shortest.com](https://shortest.com)**

0 commit comments

Comments
 (0)