eslint-plugin-chai-expect-keywords
Version:
ESLint plugin that checks for chai.js expect() assertions using non-existent keywords
154 lines (149 loc) • 2.22 kB
JavaScript
module.exports = {
CHAI: [
'to',
'be',
'been',
'is',
'that',
'which',
'and',
'has',
'have',
'with',
'at',
'of',
'same',
'but',
'does',
'not',
'deep',
'nested',
'own',
'ordered',
'any',
'all',
'a',
'an',
'include',
'includes',
'contain',
'contains',
'ok',
'true',
'false',
'null',
'undefined',
'NaN',
'exist',
'empty',
'arguments',
'Arguments',
'equal',
'equals',
'eq',
'eql',
'eqls',
'above',
'gt',
'greaterThan',
'least',
'gte',
'below',
'lt',
'lessThan',
'most',
'lte',
'within',
'instanceof',
'instanceOf',
'property',
'ownPropertyDescriptor',
'haveOwnPropertyDescriptor',
'lengthOf',
'match',
'matches',
'string',
'keys',
'key',
'throw',
'throws',
'Throw',
'respondTo',
'respondsTo',
'itself',
'satisfy',
'satisfies',
'closeTo',
'approximately',
'members',
'oneOf',
'change',
'changes',
'increase',
'increases',
'decrease',
'decreases',
'by',
'extensible',
'sealed',
'frozen',
'finite',
'fail',
],
SINON: [
'called',
'callCount',
'calledOnce',
'calledTwice',
'calledThrice',
'calledBefore',
'calledAfter',
'calledImmediatelyBefore',
'calledImmediatelyAfter',
'calledWithNew',
'alwaysCalledWithNew',
'calledOn',
'alwaysCalledOn',
'calledWith',
'alwaysCalledWith',
'calledWithExactly',
'alwaysCalledWithExactly',
'calledWithMatch',
'alwaysCalledWithMatch',
'returned',
'alwaysReturned',
'threw',
'alwaysThrew',
],
CHAI_AS_PROMISED: [
'eventually',
'notify',
'become',
'rejectedWith',
'fulfilled',
'rejected'
],
CHAI_DOM: [
'attr',
'attribute',
'class',
'id',
'html',
'text',
'value',
'empty',
'length',
'exist',
'match',
'contain',
'descendant',
'descendants',
'displayed',
'visible',
'tagName'
],
CHAI_EXCLUDE: [
'excluding',
'excludingEvery'
]
};