Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test-ended triggers despite t.plan() #1

Open
rhys-vdw opened this issue Jun 22, 2016 · 0 comments
Open

test-ended triggers despite t.plan() #1

rhys-vdw opened this issue Jun 22, 2016 · 0 comments
Labels

Comments

@rhys-vdw
Copy link

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.

@atabel atabel added the bug label Jun 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants