mirror of
https://github.com/flarum/core.git
synced 2025-08-11 19:04:29 +02:00
chore: prepare @flarum/jest-config
for release
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
This commit is contained in:
@@ -4,19 +4,19 @@ This package provides a [Jest](https://jestjs.io/) config object to run unit & i
|
||||
|
||||
## Usage
|
||||
|
||||
* Install the package: `yarn add --dev flarum-jest-config`
|
||||
* Install the package: `yarn add --dev @flarum/jest-config`
|
||||
* Add `"type": "module"` to your `package.json`
|
||||
* Add `"test": "yarn node --experimental-vm-modules $(yarn bin jest)"` to your `package.json` scripts
|
||||
* Rename `webpack.config.js` to `webpack.config.cjs`
|
||||
* Create a `jest.config.cjs` file with the following content:
|
||||
```js
|
||||
module.exports = require('flarum-jest-config')();
|
||||
module.exports = require('@flarum/jest-config')();
|
||||
```
|
||||
* If you are using TypeScript, create `tsconfig.test.json` with the following content:
|
||||
```json
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"include": ["tests/**/*"],
|
||||
"files": ["../../../node_modules/flarum-jest-config/shims.d.ts"]
|
||||
"files": ["../../../node_modules/@flarum/jest-config/shims.d.ts"]
|
||||
}
|
||||
```
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "flarum-jest-config",
|
||||
"name": "@flarum/jest-config",
|
||||
"version": "1.0.0",
|
||||
"description": "Jest config for Flarum.",
|
||||
"main": "index.cjs",
|
||||
|
Reference in New Issue
Block a user