Update checked-in dependencies
This commit is contained in:
parent
3e913ef09d
commit
9660df3fcc
990 changed files with 74805 additions and 60149 deletions
39
node_modules/eslint-plugin-jsx-a11y/__tests__/index-test.js
generated
vendored
39
node_modules/eslint-plugin-jsx-a11y/__tests__/index-test.js
generated
vendored
|
|
@ -2,36 +2,39 @@
|
|||
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
import expect from 'expect';
|
||||
import test from 'tape';
|
||||
|
||||
import plugin from '../src';
|
||||
|
||||
const rules = fs.readdirSync(path.resolve(__dirname, '../src/rules/'))
|
||||
.map((f) => path.basename(f, '.js'));
|
||||
|
||||
describe('all rule files should be exported by the plugin', () => {
|
||||
test('all rule files should be exported by the plugin', (t) => {
|
||||
rules.forEach((ruleName) => {
|
||||
it(`should export ${ruleName}`, () => {
|
||||
expect(plugin.rules[ruleName]).toEqual(
|
||||
require(path.join('../src/rules', ruleName)) // eslint-disable-line
|
||||
);
|
||||
});
|
||||
t.equal(
|
||||
plugin.rules[ruleName],
|
||||
require(path.join('../src/rules', ruleName)), // eslint-disable-line import/no-dynamic-require
|
||||
`exports ${ruleName}`,
|
||||
);
|
||||
});
|
||||
|
||||
t.end();
|
||||
});
|
||||
|
||||
describe('configurations', () => {
|
||||
it('should export a \'recommended\' configuration', () => {
|
||||
expect(plugin.configs.recommended).toBeDefined();
|
||||
});
|
||||
test('configurations', (t) => {
|
||||
t.notEqual(plugin.configs.recommended, undefined, 'exports a \'recommended\' configuration');
|
||||
|
||||
t.end();
|
||||
});
|
||||
|
||||
describe('schemas', () => {
|
||||
test('schemas', (t) => {
|
||||
rules.forEach((ruleName) => {
|
||||
it(`${ruleName} should export a schema with type object`, () => {
|
||||
const rule = require(path.join('../src/rules', ruleName)); // eslint-disable-line
|
||||
const schema = rule.meta && rule.meta.schema && rule.meta.schema[0];
|
||||
const { type } = schema;
|
||||
const rule = require(path.join('../src/rules', ruleName)); // eslint-disable-line import/no-dynamic-require
|
||||
const schema = rule.meta && rule.meta.schema && rule.meta.schema[0];
|
||||
const { type } = schema;
|
||||
|
||||
expect(type).toEqual('object');
|
||||
});
|
||||
t.equal(type, 'object', `${ruleName} exports a schema with type object`);
|
||||
});
|
||||
|
||||
t.end();
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue