var assert = require('assert');

describe('Question set', function () {
  let QuestionSet = require('../src/QuestionSet');
  let questions;

  beforeEach(function () {
    questions = new QuestionSet();
  });
  afterEach(function (done) {
    delete questions;
  });

  it('can be chained');
  it('#array returns question objects')
  it('#narrow(10).array returns a 10 element array');
  it('#narrow(0).array returns an empty array');
  it('#narrow(1000).array returns all questions');
  it('#noanswers leaves no answer properties');
});

@@ -226,14 +226,9 @@
 tion
- (done
+(
 ) %7B%0A
@@ -281,250 +281,1004 @@
 ned'
-);%0A  it('#array returns question objects')%0A  it('#narrow(10).array returns a 10 element array');%0A  it('#narrow(0).array returns an empty array');%0A  it('#narrow(1000).array returns all questions');%0A  it('#noanswers leaves no answer properties'
+, function() %7B%0A    assert.equal(questions, questions.narrow());%0A    assert.equal(questions, questions.noanswers);%0A  %7D);%0A  it('#array returns question objects', function() %7B%0A    let question = questions.array%5B0%5D;%0A%0A    assert.notEqual(question.text, undefined);%0A    assert.notEqual(question.answer, undefined);%0A  %7D);%0A  it('#narrow(10).array returns a 10 element array', function() %7B%0A    assert.equal(questions.narrow(10).array.length, 10);%0A  %7D);%0A  it('#narrow(0).array returns an empty array', function() %7B%0A    let result = questions.narrow(0).array;%0A%0A    assert.equal(result.constructor, Array);%0A    assert.equal(result.length, 0);%0A  %7D);%0A  it('#narrow(1000).array returns all questions', function() %7B%0A    let length = questions.array.length;%0A%0A    assert.equal(questions.narrow(1000).array.length, length);%0A  %7D);%0A  it('#noanswers leaves no answer properties', function() %7B%0A    let result = questions.noanswers.array;%0A%0A    for (var i in result) %7B%0A      assert(result%5Bi%5D.answer, undefined);%0A    %7D%0A  %7D
 );%0A%7D

Write tests