<commit_before>/*jshint multistr: true, unused: false*/

'use strict';

var $ = require('jquery'),
    PulsarSortableComponent = require('../../../js/PulsarSortableComponent');

$.fx.off = !$.fx.off;

describe('Sortable component', function() {

    beforeEach(function() {
        this.$html = $('<div class="fake-html"></div>').appendTo('html');
        this.$body = $('<div class="fake-body"></div>').appendTo(this.$html);
        this.$markup = $('\
<table class="table is-sortable table--full">\
<tbody>\
    <tr><td>foo</td></tr>\
</tbody>\
</table>\
').appendTo(this.$html);

        this.$table = this.$html.find('.table');

        this.pulsarSortableComponent = new PulsarSortableComponent(this.$html);
    });

    describe('Initialising the sortable component with a sortable table', function() {

        beforeEach(function() {
            sinon.spy($.fn, 'sortable');
            this.pulsarSortableComponent.init();
        });

        it('should call the sortable plugin', function() {
            expect($.fn.sortable).to.have.been.called;
        });

    });

});<commit_msg>Tweak sortable selector for sortable tests<commit_after>/*jshint multistr: true, unused: false*/

'use strict';

var $ = require('jquery'),
    PulsarSortableComponent = require('../../../js/PulsarSortableComponent');

$.fx.off = !$.fx.off;

describe('Sortable component', function() {

    beforeEach(function() {
        this.$html = $('<div class="fake-html"></div>').appendTo('html');
        this.$body = $('<div class="fake-body"></div>').appendTo(this.$html);
        this.$markup = $('\
<table class="table is-sortable table--full">\
<tbody>\
    <tr><td>foo</td></tr>\
</tbody>\
</table>\
').appendTo(this.$html);

        this.$table = this.$html.find('.table.is-sortable tbody');

        this.pulsarSortableComponent = new PulsarSortableComponent(this.$html);
    });

    describe('Initialising the sortable component with a sortable table', function() {

        beforeEach(function() {
            sinon.spy($.fn, 'sortable');
            this.pulsarSortableComponent.init();
        });

        it('should call the sortable plugin', function() {
            expect($.fn.sortable).to.have.been.called;
        });

    });

});
{'fraction_non_alphanumeric': 0.2009825815096025, 'fraction_numerical': 0.0, 'mean_word_length': 2.9646017699115044, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3303195', 'n_tokens_mistral': 704, 'n_tokens_neox': 687, 'n_words': 122}