2.0.6 • Published 6 months ago

jest-runner-remark v2.0.6

Weekly downloads
187
License
ISC
Repository
github
Last release
6 months ago

jest-runner-remark

npm npm Codecov Bundle Size Conventional Commits

Jest runner for Remark.

Usage

Configure remark-lint

jest-runner-remark is best used alongside a remark-lint configuration. See the documentation on configuring remark-lint before continuing.

Install jest-runner-remark

Install jest and jest-runner-remark

npm install --save-dev jest jest-runner-remark

# or with yarn

yarn add --dev jest jest-runner-remark

Add it to your Jest config

Using Built-in Preset

This package includes a Jest preset which configures Jest to run Remark on all files supported by Remark. To use it set the following in your package.json:

{
  "jest": {
    "preset": "jest-runner-remark"
  }
}

or jest.config.js:

module.exports = {
  preset: "jest-runner-remark",
};

Manually

In your package.json

{
  "jest": {
    "runner": "remark",
    "moduleFileExtensions": ["md", "mdx", "markdown", "mkd", "mkdn", "mkdown"],
    "testMatch": [
      "<rootDir>/**/*.md",
      "<rootDir>/**/*.mdx",
      "<rootDir>/**/*.markdown",
      "<rootDir>/**/*.mkd",
      "<rootDir>/**/*.mkdn",
      "<rootDir>/**/*.mkdown"
    ]
  }
}

Or in jest.config.js

module.exports = {
  runner: "remark",
  moduleFileExtensions: ["md", "mdx", "markdown", "mkd", "mkdn", "mkdown"],
  testMatch: [
    "<rootDir>/**/*.md",
    "<rootDir>/**/*.mdx",
    "<rootDir>/**/*.markdown",
    "<rootDir>/**/*.mkd",
    "<rootDir>/**/*.mkdn",
    "<rootDir>/**/*.mkdown",
  ],
};

Run Jest

npx jest

# or with yarn

yarn jest
2.0.6

6 months ago

2.0.5

12 months ago

2.0.4

2 years ago

2.0.3

2 years ago

2.0.2

3 years ago

2.0.1

3 years ago

2.0.0

4 years ago

1.0.33

4 years ago

1.0.32

4 years ago

1.0.34

4 years ago

1.0.31

4 years ago

1.0.30

4 years ago

1.0.29

4 years ago

1.0.28

4 years ago

1.0.27

4 years ago

1.0.26

4 years ago

1.0.25

4 years ago

1.0.24

4 years ago

1.0.23

4 years ago

1.0.22

5 years ago

1.0.21

5 years ago

1.0.20

5 years ago

1.0.19

5 years ago

1.0.18

5 years ago

1.0.17

5 years ago

1.0.16

5 years ago

1.0.15

5 years ago

1.0.14

5 years ago

1.0.13

5 years ago

1.0.12

5 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago