• File: PredicateIdTest.js
  • Full Path: /var/www/crm_set/assets/plugins/tinymce/themes/inlite/src/test/js/browser/core/PredicateIdTest.js
  • Date Modified: 09/21/2026 4:19 AM
  • File size: 573 bytes
  • MIME-type: text/plain
  • Charset: utf-8
test('browser/core/PredicateIdTest', [
	'ephox/tinymce',
	'tinymce/inlite/core/PredicateId'
], function (tinymce, PredicateId) {
	var testFromContextToolbars = function () {
		var isTrue = function () {
			return true;
		};

		var isFalse = function () {
			return false;
		};

		var predIds = PredicateId.fromContextToolbars([
			{toolbar: 'a b c', predicate: isTrue, id: 'a'},
			{toolbar: 'd e', predicate: isFalse, id: 'b'}
		]);

		assert.eq([
			PredicateId.create('a', isTrue),
			PredicateId.create('b', isFalse)
		], predIds);
	};

	testFromContextToolbars();
});