From e099aa9ce0ced2424f7d01ba249ac69b8eebe5ba Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Mon, 28 Mar 2016 17:24:27 +0100 Subject: [PATCH] test component index and stub component --- test/components/stub-component.js | 11 +++++++++++ test/test-component-index.js | 18 ++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 test/components/stub-component.js create mode 100644 test/test-component-index.js diff --git a/test/components/stub-component.js b/test/components/stub-component.js new file mode 100644 index 0000000000..8882a0b35d --- /dev/null +++ b/test/components/stub-component.js @@ -0,0 +1,11 @@ +/* A dummy React component which we use for stubbing out app-level components + */ +'use strict'; + +var React = require('react'); + +module.exports = React.createClass({ + render: function() { + return
; + }, +}); diff --git a/test/test-component-index.js b/test/test-component-index.js new file mode 100644 index 0000000000..9b5c07af54 --- /dev/null +++ b/test/test-component-index.js @@ -0,0 +1,18 @@ +/* + * test-component-index.js + * + * Stub out a bunch of the components which we expect the application to + * provide + */ +var components = require('../src/component-index.js').components; +var stub = require('./components/stub-component.js'); + +components['structures.LeftPanel'] = stub; +components['structures.RightPanel'] = stub; +components['structures.RoomDirectory'] = stub; +components['views.globals.MatrixToolbar'] = stub; +components['views.globals.GuestWarningBar'] = stub; +components['views.globals.NewVersionBar'] = stub; +components['views.elements.Spinner'] = stub; + +module.exports.components = components;