first commit
This commit is contained in:
24
node_modules/mark.js/test/specs/basic/each.js
generated
vendored
Normal file
24
node_modules/mark.js/test/specs/basic/each.js
generated
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
'use strict';
|
||||
describe('basic mark with each callback', function() {
|
||||
var $ctx, eachCalled;
|
||||
beforeEach(function(done) {
|
||||
loadFixtures('basic/main.html');
|
||||
|
||||
eachCalled = 0;
|
||||
$ctx = $('.basic');
|
||||
new Mark($ctx[0]).mark('lorem ipsum', {
|
||||
'diacritics': false,
|
||||
'separateWordSearch': false,
|
||||
'each': function() {
|
||||
eachCalled++;
|
||||
},
|
||||
'done': function() {
|
||||
done();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
it('should call the each callback for each marked element', function() {
|
||||
expect(eachCalled).toBe(4);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user