This commit is contained in:
Nikhil 2021-12-14 17:15:01 -08:00 committed by GitHub
parent 08b1c4ae74
commit e18c7562ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 1 deletions

View File

@ -15,7 +15,15 @@ describe("Transaction Class", () => {
return object;
},
refresh: (object) => Promise.resolve(object)
refresh: (object) => Promise.resolve(object),
areIdsEqual: (...identifiers) => {
return identifiers.map(utils.parseKeyString)
.every(identifier => {
return identifier === identifiers[0]
|| (identifier.namespace === identifiers[0].namespace
&& identifier.key === identifiers[0].key);
});
}
};
transaction = new Transaction(objectAPI);

View File

@ -122,6 +122,7 @@ describe("The import JSON action", function () {
];
spyOn(openmct.forms, 'showForm').and.returnValue(Promise.resolve({}));
spyOn(importFromJSONAction, 'onSave').and.returnValue(Promise.resolve({}));
importFromJSONAction.invoke(objectPath);
expect(openmct.forms.showForm).toHaveBeenCalled();