atabel / eslint-plugin-tape Goto Github PK
View Code? Open in Web Editor NEWESLint rules for tape
License: Other
ESLint rules for tape
License: Other
Since t.end()
is not required when t.plan()
is called, the following test should be excluded by test-ended
.
test('Mapper.insert()', t => {
t.plan(5);
t.throws(
() => Mapper.insert(),
TypeError,
'throws `TypeError` synchronously with no arguments'
);
t.resolvesTo(
Mapper.insert(null), null,
'resolves `null` to `null`'
);
t.resolvesToDeep(
Mapper.insert([]), [],
'resolves empty array to empty array'
);
t.resolvesToDeep(
Mapper.insert([null, null]), [],
'resolves array of `null` values to an empty array'
);
t.resolvesToDeep(
Mapper.insert(null, null), [],
'resolves multiple `null` value arguments to an empty array'
);
});
resolvesToDeep
is a custom test I've monkey patched into tape.
When using test.createStream() the following error is throw:
Error: TypeError: Cannot read property 'params' of undefined
Occurred while linting xxxx/xxxxx/xxx
at Object.CallExpression (xxxxxx/node_modules/eslint-plugin-tape/rules/use-t.js:15:21)
at predefinedRules.(anonymous function) (xxxx/node_modules/eslint-plugin-tape/create-tape-rule.js:122:27)
at listeners.(anonymous function).forEach.listener (xxxxxx/node_modules/eslint/lib/util/safe-emitter.js:45:58)
at Array.forEach ()
at Object.emit (xxxxx/node_modules/eslint/lib/util/safe-emitter.js:45:38)
Using test.onFinish()
raises two eslint errors:
Since onFinish
is an official method, that is passed a function (not a callback โ so does not need to be ended) neither of these errors should be raised by the plugin.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.