X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/a7ecaf4f3e67d670f3009e35e3c78baa8952890a..78b9dd3287f4a6e2859837bb8e978e8884d19e76:/modules/documentCanvas/canvas/utils.test3.js diff --git a/modules/documentCanvas/canvas/utils.test3.js b/modules/documentCanvas/canvas/utils.test3.js deleted file mode 100644 index c93e74b..0000000 --- a/modules/documentCanvas/canvas/utils.test3.js +++ /dev/null @@ -1,70 +0,0 @@ -define([ -'libs/chai', -'modules/documentCanvas/canvas/utils' - -], function(chai, utils) { - -'use strict'; - -var expect = chai.expect; - - -describe('utils.nearestInDocumentOrder', function() { - - - var tests = [ - ['return null if no match found', - '\ - \ -
\ - \ - ' - ], - ['returns nearest sibling if applicable', - '
\ -
\ -
\ -
\ -
\ -
\ -
\ -
\ -
' - ], - ['looks inside siblings children', - '
\ -
\ -
\ -
\ - \ -
\ -
\ -
\ - \ -
\ -
\ -
\ -
\ -
\ -
' - ] - - - ]; - - tests.forEach(function(test) { - var description = test[0], - html = test[1]; - it(description, function() { - var dom = $(html), - a = dom.find('#a').length ? dom.find('#a')[0] : null, - b = dom.find('#b')[0], - c = dom.find('#c').length ? dom.find('#c')[0] : null; - expect(utils.nearestInDocumentOrder('div', 'above', b)).to.equal(a, 'above'); - expect(utils.nearestInDocumentOrder('div', 'below', b)).to.equal(c, 'below'); - }); - }); - -}); - -});