Make it possible to only run one test file each time
This commit is contained in:
parent
a2168efcda
commit
7a821ce9d1
3 changed files with 28 additions and 18 deletions
|
@ -1,11 +1,7 @@
|
|||
// tests.js
|
||||
// all-tests.js
|
||||
//
|
||||
// Our master test file: uses the webpack require API to find our test files
|
||||
// and run them
|
||||
|
||||
// this is a handly place to make sure the sdk has been skinned
|
||||
var sdk = require("matrix-react-sdk");
|
||||
sdk.loadSkin(require('./test-component-index'));
|
||||
|
||||
var context = require.context('.', true, /-test\.jsx?$/);
|
||||
context.keys().forEach(context);
|
|
@ -1,12 +1,16 @@
|
|||
/*
|
||||
* test-component-index.js
|
||||
* skinned-sdk.js
|
||||
*
|
||||
* Stub out a bunch of the components which we expect the application to
|
||||
* provide
|
||||
* Skins the react-sdk with a few stub components which we expect the
|
||||
* application to provide
|
||||
*/
|
||||
var components = require('../src/component-index.js').components;
|
||||
|
||||
var sdk = require("../src/index");
|
||||
|
||||
var skin = require('../src/component-index.js');
|
||||
var stubComponent = require('./components/stub-component.js');
|
||||
|
||||
var components = skin.components;
|
||||
components['structures.LeftPanel'] = stubComponent();
|
||||
components['structures.RightPanel'] = stubComponent();
|
||||
components['structures.RoomDirectory'] = stubComponent();
|
||||
|
@ -18,4 +22,6 @@ components['views.messages.DateSeparator'] = stubComponent({displayName: 'DateSe
|
|||
components['views.messages.MessageTimestamp'] = stubComponent({displayName: 'MessageTimestamp'});
|
||||
components['views.messages.SenderProfile'] = stubComponent({displayName: 'SenderProfile'});
|
||||
|
||||
module.exports.components = components;
|
||||
sdk.loadSkin(skin);
|
||||
|
||||
module.exports = sdk;
|
Loading…
Add table
Add a link
Reference in a new issue