first-commit
Some checks failed
CI Pipeline / build (push) Failing after 3m23s

This commit is contained in:
2025-08-27 14:05:33 +08:00
commit 9e1b8bdc9d
5159 changed files with 1081326 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
'use strict';
describe('basic mark with custom element and class', function() {
var $ctx1, $ctx2;
beforeEach(function(done) {
loadFixtures('basic/custom-element-class.html');
$ctx1 = $('.basic-custom-element-class > div:first-child');
$ctx2 = $('.basic-custom-element-class > div:last-child');
new Mark($ctx1[0]).mark('lorem ipsum', {
'diacritics': false,
'separateWordSearch': false,
'element': 'i',
'done': function() {
new Mark($ctx2[0]).mark('lorem ipsum', {
'diacritics': false,
'separateWordSearch': false,
'element': 'i',
'className': 'custom',
'done': done
});
}
});
});
it('should not add a class to matched elements if specified', function() {
expect($ctx1.find('i')).toHaveLength(4);
});
it('should wrap matches with specified element and class', function() {
expect($ctx2.find('i.custom')).toHaveLength(4);
});
});