From 86e22779817f76da4b52f484eba86da01dc80be4 Mon Sep 17 00:00:00 2001 From: JoseLion Date: Sun, 30 Jun 2024 00:09:15 -0500 Subject: [PATCH] Revert README.md changes --- README.md | 31 ++----------------------------- 1 file changed, 2 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index 0de390e..58f1649 100644 --- a/README.md +++ b/README.md @@ -72,36 +72,9 @@ import "react-native-testing-mocks/register"; // ...rest of your setup code ``` -### Usage with Vite +### Mocha.js Example -Even though Vite could be in charge of transforming/resolving the React Native files, this library already does that under the hood with Babel. This is not ideal on Vite, but it does work with the right setup. Here's a minimal example of what your `vitest.config.ts` should look like: - -```ts -import { defineConfig } from "vitest/config"; - -export default defineConfig({ - test: { - globals: true, - include: ["test/**/*.test.ts?(x)"], - server: { - deps: { - external: [ - "react-native", - "@react-native", - ], - }, - }, - setupFiles: [ - import.meta.resolve("react-native-testing-mocks/register"), - // ...any other setup files - ], - }, -}); -``` - -### Usage with Mocha - -Some frameworks provide mechanisms to load setup modules. In Mocha.js, you can use the `--require` CLI option: +Some frameworks also provide mechanisms to load setup modules. In Mocha.js, you can use the `--require` CLI option: ```bash mocha --require react-native-testing-mocks/register