| Server IP : 209.209.40.120 / Your IP : 216.73.217.112 Web Server : Microsoft-IIS/10.0 System : Windows NT NEWWWW 10.0 build 17763 (Windows Server 2019) i586 User : NEWWWW$ ( 0) PHP Version : 8.3.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/SolidCP/Portal/tinymce/themes/inlite/src/test/js/atomic/core/ |
Upload File : |
test('browser/atomic/MatcherTest', [
'tinymce/inlite/core/Matcher'
], function (Matcher) {
var testMatch = function (mockEditor, matches, expectedResult) {
var result;
result = Matcher.match(mockEditor, matches);
assert.eq(expectedResult, result);
};
var match = function (key) {
return function (editor) {
return editor[key];
};
};
var testMatcher = function () {
var mockEditor = {
success1: 'success1',
success2: 'success2',
failure: null
};
testMatch(mockEditor, [
match('success1')
], 'success1');
testMatch(mockEditor, [
match(null),
match('success2')
], 'success2');
testMatch(mockEditor, [
match('success1'),
match('success2')
], 'success1');
testMatch(mockEditor, [
match(null)
], null);
testMatch(mockEditor, [
match(null),
match(null)
], null);
testMatch(mockEditor, [], null);
};
testMatcher();
});