#Testing with Mocha
2 messages · Page 1 of 1 (latest)
This is my mocha config
loader: 'ts-node/esm'
require: ['ts-node/register']
spec:
- '/tests/**/*.test.ts'```
2 messages · Page 1 of 1 (latest)
I'm trying to setup Mocha to work with Next.js with Typescript. Is there a recommended way to setup Mocha for Next? I keep getting errors like SyntaxError: Cannot use import statement outside a module
This is my mocha config
loader: 'ts-node/esm'
require: ['ts-node/register']
spec:
- '/tests/**/*.test.ts'```