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); + }); }); });