Some basic tests for MessagePanel

Check that it puts the read marker in the right place, and check that the
animation works.

... all of which has been surprisingly painful.
This commit is contained in:
Richard van der Hoff 2016-03-31 00:48:46 +01:00
parent d2e69c819f
commit dc5c0928b2
7 changed files with 722 additions and 27 deletions

View file

@ -4,8 +4,17 @@
var React = require('react');
module.exports = React.createClass({
render: function() {
return <div />;
},
});
module.exports = function(opts) {
opts = opts || {};
if (!opts.displayName) {
opts.displayName = 'StubComponent';
}
if (!opts.render) {
opts.render = function() {
return <div>{this.displayName}</div>;
}
}
return React.createClass(opts);
};