Skip to content
Snippets Groups Projects
Commit 4b30d2dc authored by Marie's avatar Marie
Browse files

refacto test

parent 4f36dcba
Branches
No related tags found
No related merge requests found
......@@ -2,21 +2,12 @@ const data = [ '0.0488','86400','1000','432000','100','5259600','63115200',
'5','5259600','5259600','0.8','31557600','5','24','300','12','0.67',
'1488970800','1490094000','15778800' ];
const app = require("./main");
test('app parse c', () => {
expect(app(data).c).toBe(0.0488);
});
test('app parse dt', () => {
expect(app(data).dt).toBe(86400);
});
test('app parse ud0', () => {
expect(app(data).ud0).toBe(1000);
});
test('app parse sigPeriod', () => {
expect(app(data).sigPeriod).toBe(432000);
});
test('app parse percentRot', () => {
expect(app(data).percentRot).toBe(15778800);
});
test('app parse txWindow', () => {
expect(app(data).txWindow).toBe("???");
const expected = {
c:0.0488, dt:86400, ud0:1000, sigPeriod:432000
}
test('app convert raw data to expected', () => {
const resultat = app(data);
for(let key in expected){
expect(resultat[key]).toBe(expected[key]);
}
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment