rsnext/examples/with-mocha
Mateusz Burzyński db214214d6
Update Babel dependencies (#51962)
### What?

Update Babel packages across the board

### Why?

Since you ship vendored presets and plugins it's impossible for people to update this stuff at their own pace - independently from Next. So users of `next/babel` are currently stuck with old versions and, for example, they might not be able to use the TS `satisfies` operator.

### How?

I just updated ranges (to pinned ones) where I could find them, run `corepack pnpm i` and re-run build scripts in the `packages/next`.

Fixes #43799
2023-10-17 02:25:57 +00:00
..
pages Update Examples for Fast Refresh (#13068) 2020-05-18 17:44:18 -04:00
test update mocha example with yml configuration. (#11214) 2020-03-20 10:13:57 +01:00
.babelrc Include all files in Prettier (#17050) 2020-09-14 02:53:19 +00:00
.gitignore Remove incorrect entries for pnpm debug log (#47241) 2023-03-26 22:26:05 -07:00
.mocharc.yml update mocha example with yml configuration. (#11214) 2020-03-20 10:13:57 +01:00
mocha.setup.js add mocha example (#5182) 2018-09-17 00:12:39 +02:00
package.json Update Babel dependencies (#51962) 2023-10-17 02:25:57 +00:00
README.md update example Deploy button URLs (#48842) 2023-04-26 13:31:44 -04:00

Example app with Mocha tests

This example features an app with Mocha tests.

Deploy your own

Deploy the example using Vercel or preview live with StackBlitz

Deploy with Vercel

How to use

Execute create-next-app with npm, Yarn, or pnpm to bootstrap the example:

npx create-next-app --example with-mocha with-mocha-app
yarn create next-app --example with-mocha with-mocha-app
pnpm create next-app --example with-mocha with-mocha-app

Run Mocha tests

npm run test
# or
yarn test

A very important part of this example is the .babelrc file which configures the test environment to use babel-preset-env and configures it to transpile modules to commonjs). Learn more.