devstar插件

This commit is contained in:
2025-07-26 16:40:29 +08:00
commit 30033daafe
4387 changed files with 1041101 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
'use strict';
describe('mark with acrossElements and each callback', function() {
var $ctx, eachCalled;
beforeEach(function(done) {
loadFixtures('across-elements/basic/main.html');
eachCalled = 0;
$ctx = $('.across-elements');
new Mark($ctx[0]).mark('lorem ipsum', {
'diacritics': false,
'separateWordSearch': false,
'acrossElements': true,
'each': function() {
eachCalled++;
},
'done': done
});
});
it('should call the each callback for each marked element', function() {
expect(eachCalled).toBe(6);
});
});