Skip to content

Commit

Permalink
Fix missing getTestRuleConfigs export (#81)
Browse files Browse the repository at this point in the history
  • Loading branch information
ybiquitous committed Oct 29, 2023
1 parent 93de394 commit 6d555bc
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,9 @@
# Changelog

## Head

- Fixed: missing `getTestRuleConfigs` export.

## 6.3.1

- Fixed: `loadLint` option's type declaration.
Expand Down
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -28,7 +28,7 @@ This is useful if you have many tests. There are two additional steps to do this
1. Create `jest.setup.js` in the root of your project. Provide `plugins` option to `getTestRule`/`getTestRuleConfigs`:

```js
const { getTestRule } = require("jest-preset-stylelint");
const { getTestRule, getTestRuleConfigs } = require("jest-preset-stylelint");

global.testRule = getTestRule({ plugins: ["./"] });
global.testRuleConfigs = getTestRuleConfigs({ plugins: ["./"] });
Expand Down Expand Up @@ -119,7 +119,7 @@ The `testRuleConfigs` function enables you to test invalid configs for a rule.
For example:

```js
testInvalidRuleConfigs({
testRuleConfigs({
plugins: ["."],
ruleName,

Expand Down
2 changes: 1 addition & 1 deletion __tests__/getTestRule.test.js
@@ -1,6 +1,6 @@
'use strict';

const getTestRule = require('../getTestRule.js');
const { getTestRule } = require('../index.js');

const testRule = getTestRule();
const plugins = [require.resolve('./fixtures/plugin-foo.js')];
Expand Down
2 changes: 1 addition & 1 deletion __tests__/getTestRuleConfigs.test.js
@@ -1,6 +1,6 @@
'use strict';

const getTestRuleConfigs = require('../getTestRuleConfigs.js');
const { getTestRuleConfigs } = require('../index.js');

const testRuleConfigs = getTestRuleConfigs();
const plugins = [require.resolve('./fixtures/plugin-foo.js')];
Expand Down
5 changes: 3 additions & 2 deletions index.js
@@ -1,5 +1,6 @@
'use strict';

const getTestRule = require('./getTestRule');
const getTestRule = require('./getTestRule.js');
const getTestRuleConfigs = require('./getTestRuleConfigs.js');

module.exports = { getTestRule };
module.exports = { getTestRule, getTestRuleConfigs };

0 comments on commit 6d555bc

Please sign in to comment.