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 b2bf591
Showing 1 changed file with 3 additions and 0 deletions.
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 b2bf591

Please sign in to comment.