const transport = require(__dirname + '/mocks/transport-options.js'); 
const options = require('../options.js');
const assert = require('assert');

describe('transport', function () {
    it ('should return json data string', function(done) {
        transport.request({}, function (data) {
            JSON.parse(data);
            done();
        });
    });
    it ('should contain options.option with length >= 2', function(done) {
        transport.request({}, function (data) {
            var parsed = JSON.parse(data);
            assert(parsed.options.option.length >= 2);
            done();
        });
    });

});

describe('options', function () {
    it ('should order by strike price', function (done) {
        transport.request({}, function (data) {
            var parsed = JSON.parse(data);
            var last = Number.MAX_VALUE;
            parsed.options.option.forEach(function (option) {
                assert(typeof(option.strike) === "number");
                console.log(option.strike, last);
                assert(option.strike <= last);
                last = option.strike;
            });
            done();
        });
    });
});

@@ -647,32 +647,320 @@
 , function () %7B%0A
+    it ('should ccontain option list', function (done) %7B%0A        transport.request(%7B%7D, function (data) %7B%0A            var parsed = JSON.parse(data);%0A            var last = Number.MAX_VALUE;%0A            assert(134 == parsed.options.option.length);%0A            done();%0A        %7D);%0A%0A    %7D);%0A%0A
     it ('should 
@@ -1259,58 +1259,8 @@
 %22);%0A
-                console.log(option.strike, last);%0A
     

check size