Allow fetch() to be stubbed for the RtsClient
- so that we can write some tests for it.
This commit is contained in:
parent
a05bafed6a
commit
9ff52b182f
3 changed files with 16 additions and 5 deletions
|
@ -15,6 +15,7 @@ limitations under the License.
|
|||
*/
|
||||
|
||||
import Skinner from './Skinner';
|
||||
import RtsClient from './RtsClient';
|
||||
|
||||
module.exports.loadSkin = function(skinObject) {
|
||||
Skinner.load(skinObject);
|
||||
|
@ -27,3 +28,7 @@ module.exports.resetSkin = function() {
|
|||
module.exports.getComponent = function(componentName) {
|
||||
return Skinner.getComponent(componentName);
|
||||
};
|
||||
|
||||
module.exports.setFetch = function(fetchFunction) {
|
||||
RtsClient.setFetch(fetchFunction);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue