2.0.4 • Published 11 months ago

jest-runner-remark v2.0.4

Weekly downloads
187
License
ISC
Repository
github
Last release
11 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.4

11 months ago

2.0.3

1 year ago

2.0.2

2 years ago

2.0.1

2 years ago

2.0.0

3 years ago

1.0.33

3 years ago

1.0.32

3 years ago

1.0.34

3 years ago

1.0.31

3 years ago

1.0.30

3 years ago

1.0.29

3 years ago

1.0.28

3 years ago

1.0.27

3 years ago

1.0.26

3 years ago

1.0.25

3 years ago

1.0.24

3 years ago

1.0.23

3 years ago

1.0.22

3 years ago

1.0.21

3 years ago

1.0.20

3 years ago

1.0.19

3 years ago

1.0.18

3 years ago

1.0.17

3 years ago

1.0.16

3 years ago

1.0.15

4 years ago

1.0.14

4 years ago

1.0.13

4 years ago

1.0.12

4 years ago

1.0.11

4 years ago

1.0.10

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

5 years ago