@zeltjs/testing 0.0.1 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -0
- package/package.json +2 -2
package/README.md
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# @zeltjs/testing
|
|
2
|
+
|
|
3
|
+
Testing utilities for Zelt applications.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -D @zeltjs/testing
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { createTestApp } from '@zeltjs/testing';
|
|
15
|
+
import { describe, it, expect } from 'vitest';
|
|
16
|
+
|
|
17
|
+
describe('HelloController', () => {
|
|
18
|
+
it('returns hello message', async () => {
|
|
19
|
+
const app = createTestApp({ controllers: [HelloController] });
|
|
20
|
+
const res = await app.request('/hello');
|
|
21
|
+
expect(res.status).toBe(200);
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Documentation
|
|
27
|
+
|
|
28
|
+
See [zeltjs.dev](https://zeltjs.dev) for full documentation.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeltjs/testing",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"peerDependencies": {
|
|
24
24
|
"@needle-di/core": "1.1.2",
|
|
25
25
|
"vitest": ">=4 <5",
|
|
26
|
-
"@zeltjs/core": "0.
|
|
26
|
+
"@zeltjs/core": "0.1.1"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@needle-di/core": "1.1.2"
|