forked from afropolymath/javascript-tdd-setup
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtests.js
24 lines (21 loc) · 730 Bytes
/
tests.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
'use strict'
var chai = require('chai');
var assert = chai.assert;
var lib = require('./lib/library.js');
describe("Test that constants are computed properly", function() {
it("should give 10, 4 for constants 2, 5 as a and n respectively", function() {
assert(
lib.compareCoefficients(lib.quadraticDerivative(2, 5), { a: 10, n: 4 })
);
});
it("should give 2, 1 for constants 1, 2 as a and n respectively", function() {
assert(
lib.compareCoefficients(lib.quadraticDerivative(1, 2), { a: 2, n: 1 })
);
});
it("should give 8, 1 for constants 4, 2 as a and n respectively", function() {
assert(
lib.compareCoefficients(lib.quadraticDerivative(4, 2), { a: 8, n: 1 })
);
});
});