Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
epidemian
GitHub Repository: epidemian/eslint-plugin-import
Path: blob/main/tests/src/core/docsUrl.js
829 views
1
import { expect } from 'chai';
2
3
import pkg from '../../../package.json';
4
import docsUrl from '../../../src/docsUrl';
5
6
describe('docsUrl', function () {
7
it('returns the rule documentation URL when given a rule name', function () {
8
expect(docsUrl('foo')).to.equal(`https://github.com/import-js/eslint-plugin-import/blob/v${pkg.version}/docs/rules/foo.md`);
9
});
10
11
it('supports an optional commit-ish parameter', function () {
12
expect(docsUrl('foo', 'bar')).to.equal('https://github.com/import-js/eslint-plugin-import/blob/bar/docs/rules/foo.md');
13
});
14
});
15
16