Skip to content

Commit

Permalink
Reorganizing tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Mar 3, 2015
1 parent b188157 commit f77c0cd
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
var test = require('tape');
var genFunction = require('../');

test('genFunction is undefined or a generator', function (t) {
if (genFunction) {
t.equal(typeof genFunction, 'function', 'genFunction is function');
t.equal(String(genFunction), 'function* () { var x = yield; return x || 42; }', 'genFunction has expected body');
} else {
t.equal(typeof genFunction, 'undefined', 'genFunction is undefined');
}
test('generators supported', { skip: !genFunction }, function (t) {
t.equal(typeof genFunction, 'function', 'genFunction is function');
t.equal(String(genFunction), 'function* () { var x = yield; return x || 42; }', 'genFunction has expected body');
t.end();
});

test('generators not supported', { skip: genFunction }, function (t) {
t.equal(typeof genFunction, 'undefined', 'genFunction is undefined');
t.end();
});

0 comments on commit f77c0cd

Please sign in to comment.