Skip to content

Commit

Permalink
Broken test for metal#259
Browse files Browse the repository at this point in the history
  • Loading branch information
bryceosterhaus committed Sep 21, 2017
1 parent bc11929 commit 8fd2a85
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions packages/metal-jsx/test/JSXDataManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
});
});

0 comments on commit 8fd2a85

Please sign in to comment.