From 449267e72e299ce24a0fd04f68e71894b48b2ee3 Mon Sep 17 00:00:00 2001 From: Bryce Osterhaus Date: Thu, 21 Sep 2017 09:08:20 -0700 Subject: [PATCH] Broken test for https://github.com/metal/metal.js/issues/259 --- packages/metal-jsx/test/JSXDataManager.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/packages/metal-jsx/test/JSXDataManager.js b/packages/metal-jsx/test/JSXDataManager.js index 3dfbf36a..ab769cb2 100644 --- a/packages/metal-jsx/test/JSXDataManager.js +++ b/packages/metal-jsx/test/JSXDataManager.js @@ -374,5 +374,22 @@ describe('JSXDataManager', function() { assert.strictEqual('defaultFoo', component.propsChanged.args[0][0].foo); assert.strictEqual('foo', component.props.foo); }); + + it('should use default prop value when `undefined` is passed', function() { + class TestComponent extends Component { + } + + TestComponent.DATA_MANAGER = JSXDataManager; + + TestComponent.PROPS = { + foo: { + value: 'defaultFoo' + } + }; + + component = new TestComponent({foo: undefined}); + + assert.strictEqual('defaultFoo', component.props.foo); + }); }); });