X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/09589363a7277caaf740bc030a55cac5166d3c5d..ab3a2987b2eaca2555a206ac8d4f73903aa9870f:/src/editor/modules/nodePane/metaWidget/metaWidget.test.js?ds=sidebyside diff --git a/src/editor/modules/nodePane/metaWidget/metaWidget.test.js b/src/editor/modules/nodePane/metaWidget/metaWidget.test.js deleted file mode 100644 index f546248..0000000 --- a/src/editor/modules/nodePane/metaWidget/metaWidget.test.js +++ /dev/null @@ -1,35 +0,0 @@ -define([ -'libs/chai', -'libs/sinon', -'modules/nodePane/metaWidget/metaWidget' -], function(chai, sinon, metaWidget) { - -'use strict'; - -var assert = chai.assert; - -describe('metaWidget', function() { - it('calls calls registered callback on value change', function() { - var dom = $('
'); - var widget = metaWidget.create({ - el: dom, - attrs: {'uri': {type: 'string', value: 'test string'}}, - }); - - var spy = sinon.spy(); - widget.on('valueChanged', spy); - var input = dom.find('input'); - - input.change(); - assert.ok(spy.calledOnce, 'called once'); - assert.ok(spy.calledWith('uri', 'test string'), 'called with'); - - spy.reset(); - input.val('new val').change(); - assert.ok(spy.calledOnce, 'called once'); - assert.ok(spy.calledWith('uri', 'new val'), 'called with new val'); - }); -}); - - -}); \ No newline at end of file