This commit is contained in:
32
node_modules/mark.js/test/specs/across-elements/basic/empty.js
generated
vendored
Normal file
32
node_modules/mark.js/test/specs/across-elements/basic/empty.js
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
'use strict';
|
||||
describe('mark with acrossElements in an empty context', function() {
|
||||
var $ctx1, $ctx2, done1 = false,
|
||||
done2 = false;
|
||||
beforeEach(function(done) {
|
||||
loadFixtures('across-elements/basic/empty.html');
|
||||
|
||||
$ctx1 = $('.notExistingSelector');
|
||||
$ctx2 = $('.across-elements-empty');
|
||||
new Mark($ctx1[0]).mark('lorem', {
|
||||
'diacritics': false,
|
||||
'separateWordSearch': false,
|
||||
'acrossElements': true,
|
||||
'done': function() {
|
||||
done1 = true;
|
||||
new Mark($ctx2[0]).mark('lorem', {
|
||||
'diacritics': false,
|
||||
'separateWordSearch': false,
|
||||
'done': function() {
|
||||
done2 = true;
|
||||
done();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
it('should call the done function', function() {
|
||||
expect(done1).toBe(true);
|
||||
expect(done2).toBe(true);
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user