You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -38,16 +38,40 @@ Currently, [`@tsed/mongoose`](https://www.npmjs.com/package/@tsed/mongoose) allo
38
38
39
39
Before using the `@tsed/mongoose` package, we need to install the [mongoose](https://www.npmjs.com/package/mongoose) module.
40
40
41
-
```bash
42
-
npm install --save mongoose
43
-
npm install --save @tsed/mongoose
44
-
npm install --save-dev @tsed/testing-mongoose
41
+
<Tabsclass="-code">
42
+
<Tablabel="npm">
43
+
44
+
```sh [npm]
45
+
npm install --save mongoose @tsed/mongoose
46
+
npm install --save-dev @tsed/testcontainers-mongo
45
47
```
46
48
47
-
::: warning
48
-
Since mongoose v5.11.0, the module expose his own file definition and can broke your build!
49
-
To solve it, install @tsed/mongoose v6.14.1 and remove the `@types/mongoose` dependencies.
50
-
:::
49
+
</Tab>
50
+
<Tablabel="yarn">
51
+
52
+
```sh [yarn]
53
+
yarn add mongoose @tsed/mongoose
54
+
yarn add -D @tsed/testcontainers-mongo
55
+
```
56
+
57
+
</Tab>
58
+
<Tablabel="pnpm">
59
+
60
+
```sh [pnpm]
61
+
pnpm add mongoose @tsed/mongoose
62
+
pnpm add -D @tsed/testcontainers-mongo
63
+
```
64
+
65
+
</Tab>
66
+
<Tablabel="bun">
67
+
68
+
```sh [bun]
69
+
bun add mongoose @tsed/mongoose
70
+
bun add -D @tsed/testcontainers-mongo
71
+
```
72
+
73
+
</Tab>
74
+
</Tabs>
51
75
52
76
Then import `@tsed/mongoose` in your [Configuration](/docs/configuration.md):
53
77
@@ -319,92 +343,84 @@ export class MyRepository {
319
343
320
344
## Testing
321
345
322
-
The package [`@tsed/testing-mongoose`](https://www.npmjs.com/package/@tsed/testing-mongoose)allows you to test your server with a memory database.
346
+
The [`@tsed/testcontainers-mongo`](https://www.npmjs.com/package/@tsed/testcontainers-mongo) package allows you to test your code using the [TestContainers](https://node.testcontainers.org/) library.
323
347
324
-
::: tip
325
-
This package uses the amazing [mongodb-memory-server](https://www.npmjs.com/package/mongodb-memory-server) to mock the mongo database.
326
-
:::
348
+
### Configuration
327
349
328
-
### Testing API
329
-
330
-
This example shows you how you can test your Rest API with superagent and a mocked Mongo database:
350
+
To use the `@tsed/testcontainers-mongo` package, you need to install the package:
0 commit comments