# All files / __test__ fixtures-fuzzysearch.js

100% Statements 13/13
100% Branches 0/0
100% Functions 2/2
100% Lines 13/13

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    461x

    1x

    6x
    6x

    6x
    6x
    12x

    6x

    6x

    6x

    6x

    1x

    1x
     const $ = require('jquery');

    var fixtureFuzzysearch = {
        list: function(valueNames) {
            var listHtml = $('<div id="list-fuzzy-search"><input class="fuzzy-search" /><ul class="list"></ul></div>'),
                item = "";

            item = "<li>";
            for (var i = 0; i < valueNames.length; i++) {
                item += '<span class="'+valueNames[i]+'"</span>';
            }
            item += "</li>";

            $(document.body).append(listHtml);

            return item;
        },
        removeList: function() {
            $('#list-fuzzy-search').remove();
        },
        i1: { name: "Guybrush Threepwood" },
        i2: { name: "Manny Calavera" },
        i3: { name: "Bernard Bernoulli" },
        i4: { name: "LeChuck" },
        i5: { name: "Elaine Marley-Threepwood" },
        i6: { name: "Purple Tentacle" },
        i7: { name: "Adrian Ripburger" },
        i8: { name: "Bobbin Threadbare" },
        i9: { name: "Murray the Demonic Skull" },
        i10: { name: "Zak McKracken" }
    };
    fixtureFuzzysearch.all = [
        fixtureFuzzysearch.i1,
        fixtureFuzzysearch.i2,
        fixtureFuzzysearch.i3,
        fixtureFuzzysearch.i4,
        fixtureFuzzysearch.i5,
        fixtureFuzzysearch.i6,
        fixtureFuzzysearch.i7,
        fixtureFuzzysearch.i8,
        fixtureFuzzysearch.i9,
        fixtureFuzzysearch.i10
    ];

    module.exports = fixtureFuzzysearch;