Skip to content

Commit

Permalink
More cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Maurits Rijk committed May 22, 2017
1 parent f3d4728 commit 5d56e26
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 23 deletions.
1 change: 0 additions & 1 deletion test/doubleIn.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ const _ = require('lodash');
const {expect} = require('chai');

const s = require('../lib/spec');
const stest = require('../lib/test');

const {exerciseFunc, idemPotent} = require('./utils');

Expand Down
9 changes: 3 additions & 6 deletions test/isInstInRange.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
const {expect} = require('chai');

const s = require('../lib/spec');
const stest = require('../lib/test');

const {check} = require('./utils');

describe('Test isInstInRange function', () => {
it('should return true if value is within range', () => {
Expand All @@ -26,10 +27,6 @@ describe('Test isInstInRange function', () => {
});

it('should use the spec to test', () => {
const instInRange = s.isInstInRange;
const specs = require('../specs/instInRange');
s.fdef(instInRange, specs);

expect(stest.check(instInRange)).to.have.property('result').to.equal(true);
expect(check(s.isInstInRange, '../specs/instInRange')).to.have.property('result').to.equal(true);
});
});
9 changes: 3 additions & 6 deletions test/isIntInRange.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
const {expect} = require('chai');

const s = require('../lib/spec');
const stest = require('../lib/test');

const {check} = require('./utils');

describe('Test isIntInRange? function', () => {
it('should return true if value is within range', () => {
Expand All @@ -17,10 +18,6 @@ describe('Test isIntInRange? function', () => {
});

it('should use the spec to test', () => {
const intInRange = s.isIntInRange;
const specs = require('../specs/intInRange');
s.fdef(intInRange, specs);

expect(stest.check(intInRange)).to.have.property('result').to.equal(true);
expect(check(s.isIntInRange, '../specs/intInRange')).to.have.property('result').to.equal(true);
});
});
1 change: 0 additions & 1 deletion test/nilable.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ const _ = require('lodash');
const {expect} = require('chai');

const s = require('../lib/spec');
const stest = require('../lib/test');

const {isNull, isString, unknownString} = s.utils;

Expand Down
10 changes: 2 additions & 8 deletions test/question.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ const _ = require('lodash');
const {expect} = require('chai');;

const s = require('../lib/spec');
const stest = require('../lib/test');

const {exerciseFunc, idemPotent} = require('./utils');
const {check, exerciseFunc, idemPotent} = require('./utils');

const {isInteger, isNull, isOdd, isString} = s.utils;

Expand Down Expand Up @@ -40,12 +39,7 @@ describe('Test the question (?) function', () => {
});

it('should use the spec to test', () => {
const question = s.question;
const specs = require('../specs/question');

s.fdef(question, specs);

expect(stest.check(question)).to.have.property('result').to.equal(true);
expect(check(s.question, '../specs/question')).to.have.property('result').to.equal(true);
});

it('should exercise the question function', () => {
Expand Down
1 change: 0 additions & 1 deletion test/tuple.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ const _ = require('lodash');
const {expect} = require('chai');

const s = require('../lib/spec');
const stest = require('../lib/test');

const {check, exerciseFunc, idemPotent} = require('./utils');

Expand Down

0 comments on commit 5d56e26

Please sign in to comment.