var ScatterSmith = require('@src/traces/scattersmith');

describe('Test scattersmith trace defaults:', function() {
    var traceOut;

    function _supply(traceIn, layout) {
        traceOut = {};
        ScatterSmith.supplyDefaults(traceIn, traceOut, '#444', layout || {});
    }

    it('should not truncate *re* when longer than *im*', function() {
        // this is handled at the calc step now via _length.
        _supply({
            re: [1, 2, 3, 4, 5],
            im: [1, 2, 3]
        });

        expect(traceOut.re).toEqual([1, 2, 3, 4, 5]);
        expect(traceOut.im).toEqual([1, 2, 3]);
        expect(traceOut._length).toBe(3);
    });

    it('should not truncate *im* when longer than *re*', function() {
        // this is handled at the calc step now via _length.
        _supply({
            re: [1, 2, 3],
            im: [1, 2, 3, 4, 5]
        });

        expect(traceOut.re).toEqual([1, 2, 3]);
        expect(traceOut.im).toEqual([1, 2, 3, 4, 5]);
        expect(traceOut._length).toBe(3);
    });
});

@@ -1,12 +1,48 @@
+var Plotly = require('@lib/index');%0A
 var ScatterS
@@ -84,16 +84,298 @@
 smith');
+%0Avar Lib = require('@src/lib');%0Aconst %7B assertHoverLabelContent %7D = require('../assets/custom_assertions');%0A%0Avar createGraphDiv = require('../assets/create_graph_div');%0Avar destroyGraphDiv = require('../assets/destroy_graph_div');%0A%0Avar mouseEvent = require('../assets/mouse_event');
 %0A%0Adescri
@@ -1325,28 +1325,28 @@
 ength).toBe(3);%0A
-
     %7D);%0A%7D);%0A
@@ -1341,12 +1341,919 @@
     %7D);%0A%7D);%0A
+%0Adescribe('Test scattersmith hover', function () %7B%0A    var gd;%0A%0A    afterEach(destroyGraphDiv);%0A%0A    function run(specs) %7B%0A        gd = createGraphDiv();%0A%0A        var fig = Lib.extendDeep(%0A            %7Bwidth: 700, height: 500%7D,%0A            specs.mock %7C%7C require('@mocks/zzz_smith_basic.json')%0A        );%0A%0A        if(specs.patch) %7B%0A            fig = specs.patch(fig);%0A        %7D%0A%0A        var pos = specs.pos %7C%7C %5B200, 200%5D;%0A%0A        return Plotly.newPlot(gd, fig).then(function () %7B%0A            mouseEvent('mousemove', pos%5B0%5D, pos%5B1%5D);%0A            assertHoverLabelContent(specs);%0A        %7D);%0A    %7D%0A%0A    %5B%7B%0A        desc: 'Smith chart hover labels',%0A        nums: '0.1 + 0.1j',%0A        pos: %5B80, 175%5D,%0A        name: 'trace 0'%0A    %7D%5D.forEach(function (specs) %7B%0A        it('should generate correct hover labels ' + specs.desc, function (done) %7B%0A            run(specs).then(done, done.fail);%0A        %7D);%0A    %7D)%0A%7D);%0A

Add hover test for smith plot