Skip to content

Commit

Permalink
[Tests] cli: test the current plugin, not an installed one
Browse files Browse the repository at this point in the history
  • Loading branch information
ota-meshi authored and ljharb committed Aug 17, 2021
1 parent ce8b203 commit 83ba4c8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 0 additions & 1 deletion package.json
Expand Up @@ -78,7 +78,6 @@
"eslint-import-test-order-redirect": "file:./tests/files/order-redirect",
"eslint-module-utils": "file:./utils",
"eslint-plugin-eslint-plugin": "^2.3.0",
"eslint-plugin-import": "2.x",
"eslint-plugin-json": "^2.1.2",
"fs-copy-file-sync": "^1.1.1",
"glob": "^7.1.7",
Expand Down
3 changes: 3 additions & 0 deletions tests/src/cli.js
Expand Up @@ -7,6 +7,7 @@ import { expect } from 'chai';
import { CLIEngine } from 'eslint';
import eslintPkg from 'eslint/package.json';
import semver from 'semver';
import * as importPlugin from '../../src/index';

describe('CLI regression tests', function () {
describe('issue #210', function () {
Expand All @@ -20,6 +21,7 @@ describe('CLI regression tests', function () {
'named': 2,
},
});
cli.addPlugin('eslint-plugin-import', importPlugin);
});
it("doesn't throw an error on gratuitous, erroneous self-reference", function () {
expect(() => cli.executeOnFiles(['./tests/files/issue210.js'])).not.to.throw();
Expand All @@ -38,6 +40,7 @@ describe('CLI regression tests', function () {
rulePaths: ['./src/rules'],
ignore: false,
});
cli.addPlugin('eslint-plugin-import', importPlugin);
}
});

Expand Down

0 comments on commit 83ba4c8

Please sign in to comment.