File: test.js

package info (click to toggle)
node-is-generator-fn 1.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 100 kB
  • sloc: makefile: 2; sh: 2
file content (17 lines) | stat: -rw-r--r-- 251 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import test from 'ava';
import fn from './';

test(t => {
	t.true(fn(function * () {}));

	t.true(fn(function * () {
		yield 'unicorn';
	}));

	t.false(fn(null));
	t.false(fn(undefined));
	t.false(fn(function () {}));
	t.false(fn(''));

	t.end();
});