Skip to content
This repository was archived by the owner on May 8, 2025. It is now read-only.

Commit 5b39e88

Browse files
committed
chore: use vitest
1 parent a563283 commit 5b39e88

File tree

9 files changed

+2376
-45
lines changed

9 files changed

+2376
-45
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
.idea
22
node_modules
33
dist
4+
dump.rdb

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,3 +135,23 @@ It's relatively straight-forward to add more commands (see [here](https://github
135135
Retain the time to live associated with the key.
136136
- `PERSIST()`
137137
Remove the time to live associated with the key.
138+
139+
## Development
140+
141+
To run the tests, first install [Redis Stack](https://redis.io/docs/latest/operate/oss_and_stack/install/install-stack/). If you don't use Homebrew, you need to update `redis.conf` in this repository to use the correct path to the `redisearch.so` binary.
142+
143+
```sh
144+
brew install redis-stack
145+
```
146+
147+
Then start the Redis server from the root directory:
148+
149+
```sh
150+
redis-stack-server redis.conf
151+
```
152+
153+
Then run the tests. 🥳
154+
155+
```sh
156+
pnpm test
157+
```

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "Connect to your Redis server using cloudflare:sockets",
55
"scripts": {
66
"build": "tsup",
7-
"test": "tsx --test"
7+
"test": "vitest"
88
},
99
"main": "dist/index.mjs",
1010
"files": [
@@ -57,6 +57,7 @@
5757
"prettier-plugin-organize-imports": "^4.1.0",
5858
"tsup": "^8.3.0",
5959
"tsx": "^4.19.1",
60-
"typescript": "^5.6.3"
60+
"typescript": "^5.6.3",
61+
"vitest": "^3.0.6"
6162
}
6263
}

0 commit comments

Comments
 (0)