first commit
This commit is contained in:
30
node_modules/mark.js/test/specs/basic/debug.js
generated
vendored
Normal file
30
node_modules/mark.js/test/specs/basic/debug.js
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
'use strict';
|
||||
describe('basic mark with debug callback', function() {
|
||||
var $ctx, debugCalled;
|
||||
beforeEach(function(done) {
|
||||
loadFixtures('basic/main.html');
|
||||
|
||||
debugCalled = 0;
|
||||
$ctx = $('.basic');
|
||||
new Mark($ctx[0]).mark('lorem ipsum', {
|
||||
'diacritics': false,
|
||||
'separateWordSearch': false,
|
||||
'debug': true,
|
||||
'log': {
|
||||
'debug': function() {
|
||||
debugCalled++;
|
||||
},
|
||||
'warn': function() {
|
||||
debugCalled++;
|
||||
}
|
||||
},
|
||||
'done': function() {
|
||||
done();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
it('should call the log function when debug is enabled', function() {
|
||||
expect(debugCalled).toBeGreaterThan(0);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user