"use strict";
/* eslint-env node,mocha */


const expect = require('expect.js');

const getSeason = require('../date/getSeason');
const strftime  = require('../date/strftime');

describe("Date functions", function() {

  it("should test getSeason", function() {
    expect(getSeason(new Date('2016-01-01'))).to.eql("winter");
    expect(getSeason(new Date('2016-12-31'))).to.eql("winter");

    expect(getSeason(new Date('2016-04-01'))).to.eql("spring");
    expect(getSeason(new Date('2016-07-01'))).to.eql("summer");
    expect(getSeason(new Date('2016-10-01'))).to.eql("autumn");
  });

  it("should test strftime", function() {
    var date = new Date('2016-01-01');
    expect(strftime(date, '%d')).to.eql("01");
    expect(strftime(date, '%v')).to.eql("Sun Dec 27 2015 00:00:00 GMT+0100 (STD)");
    expect(strftime(date, '%E')).to.eql("winter");
    expect(strftime(date, '%g')).to.eql("%g"); //doesn't exist
    //expect(strftime(date, '%%')).to.eql("%"); doesn't work...
  });

});

@@ -664,27 +664,38 @@
 1-01');%0A
+%0A
     
-expect(
+let tmp_string = 
 strftime
@@ -707,27 +707,98 @@
 , '%25
-d')).to.eql(%2201%22
+v');%0A%0A    //this fix for travis tests%0A    tmp_string = tmp_string.replace('STD', 'UTC'
 );%0A
+%0A
     
@@ -821,17 +821,17 @@
 date, '%25
-v
+d
 ')).to.e
@@ -834,16 +834,53 @@
 to.eql(%22
+01%22);%0A    expect(tmp_string).to.eql(%22
 Sun Dec 
@@ -906,19 +906,19 @@
 T+0100 (
-STD
+UTC
 )%22);%0A   

fix date tests crossplatforms