Skip to content

Commit

Permalink
Add pkg version to testing guide (prisma#2328)
Browse files Browse the repository at this point in the history
* fix: broken links in mdx files

* add: initial full-text search docs

* Update content/200-concepts/100-components/02-prisma-client/060-full-text-search.mdx

* Update content/200-concepts/100-components/02-prisma-client/060-full-text-search.mdx

* Update content/200-concepts/100-components/02-prisma-client/060-full-text-search.mdx

* Update content/200-concepts/100-components/02-prisma-client/060-full-text-search.mdx

* added note about jest mock version use din guide

Co-authored-by: Nilu <nilubava@gmail.com>
Co-authored-by: Matthew Mueller <mattmuelle@gmail.com>
  • Loading branch information
3 people committed Sep 16, 2021
1 parent 7dbd3cd commit 31a53e3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions content/300-guides/150-testing/100-unit-testing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@ This guide will cover two approaches to mocking the client, a singleton instance
npm install jest-mock-extended --save-dev
```

<Admonition type="alert">

At the time of writing, this guide uses `jest-mock-extended` version `^2.0.2-beta2`.

</Admonition>

### Singleton

The following steps guide you through mocking the Prisma Client using a singleton pattern.
Expand Down
6 changes: 6 additions & 0 deletions content/300-guides/150-testing/150-integration-testing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ One way to simulate a real world environment is to use [Docker](https://www.dock

This guide assumes you have [Docker](https://docs.docker.com/get-docker/) and [Docker Compose](https://docs.docker.com/compose/install/) installed on your machine as well as [`Jest`](/guides/testing/unit-testing#add-jest-to-project) setup in your project.

<Admonition type="alert">

At the time of writing, this guide uses `jest-mock-extended` version `^2.0.2-beta2`. See [mocking the Prisma Client](/guides/testing/unit-testing#mocking-the-prisma-client) for information on how to use this version.

</Admonition>

The following ecommerce schema will be used throughout the guide. This varies from the traditional `User` and `Post` models used in other parts of the docs, mainly because it is unlikely you will be running integration tests against your blog.

<details><summary>Ecommerce schema</summary>
Expand Down

0 comments on commit 31a53e3

Please sign in to comment.