PHP Classes

File: public/js/tinymce/src/themes/inlite/src/test/js/atomic/core/MatcherTest.js

Recommend this page to a friend!
  Classes of Abed Nego Ragil Putra   GoLavaCMS   public/js/tinymce/src/themes/inlite/src/test/js/atomic/core/MatcherTest.js   Download  
File: public/js/tinymce/src/themes/inlite/src/test/js/atomic/core/MatcherTest.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: GoLavaCMS
Publish content on Web pages with SEO support
Author: By
Last change:
Date: 6 years ago
Size: 1,083 bytes
 

Contents

Class file image Download
test( 'browser.themes.inlite.MatcherTest', [ 'tinymce.themes.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(); } );