Code Monkey home page Code Monkey logo

eslint-plugin-tape's People

Contributors

abdult avatar atabel avatar bdougherty avatar bojand avatar forresst avatar jamestalmage avatar jfmengels avatar moox avatar sindresorhus avatar solcik avatar twada avatar wenzowski avatar wyze avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

paambaati

eslint-plugin-tape's Issues

`test-ended` triggers despite `t.plan()`

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.

Use-T rule error when using test.createStream()

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)

Unknown test modifier `onFinish`

Using test.onFinish() raises two eslint errors:

  • Unknown test modifier and
  • Test was not ended

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.