mirror of
https://github.com/nasa/openmct.git
synced 2025-06-17 14:48:13 +00:00
[Core] Add spec for StaticModelProvider
Add spec for StaticModelProvider to increase coverage in platform/core, for WTD-573.
This commit is contained in:
@ -4,7 +4,7 @@
|
||||
* Module defining RootModelProvider. Created by vwoeltje on 11/7/14.
|
||||
*/
|
||||
define(
|
||||
['./StaticModelProvider.js'],
|
||||
['./StaticModelProvider'],
|
||||
function (StaticModelProvider) {
|
||||
"use strict";
|
||||
|
||||
|
@ -12,7 +12,7 @@ define(
|
||||
* Loads static models, provided as declared extensions of bundles.
|
||||
* @constructor
|
||||
*/
|
||||
function StaticModelProvider(models, $log) {
|
||||
function StaticModelProvider(models, $q, $log) {
|
||||
var modelMap = {};
|
||||
|
||||
function addModelToMap(model) {
|
||||
@ -54,7 +54,7 @@ define(
|
||||
ids.forEach(function (id) {
|
||||
result[id] = modelMap[id];
|
||||
});
|
||||
return Promise.resolve(result);
|
||||
return $q.when(result);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user