Warp/node_modules/mark.js/test/specs/iframes/exclude.js
2024-01-05 19:14:38 +07:00

26 lines
622 B
JavaScript

'use strict';
describe('mark with iframes and exclude', function() {
var $ctx, $elements;
beforeEach(function(done) {
loadFixtures('iframes/exclude.html');
$elements = $();
$ctx = $('.iframes-exclude');
new Mark($ctx[0]).mark('lorem', {
'diacritics': false,
'separateWordSearch': false,
'iframes': true,
'exclude': [
'.ignore'
],
'each': function($m) {
$elements = $elements.add($($m));
},
'done': done
});
});
it('should ignore iframes matching exclude selectors', function() {
expect($elements).toHaveLength(4);
});
});