Fix operationExtract code tests

This commit is contained in:
Quincy Morgan
2020-06-05 14:35:32 -04:00
parent f14577b2d0
commit c908667a79
+9 -2
View File
@@ -6,14 +6,21 @@ describe('iD.operationExtract', function () {
fakeContext = {};
fakeContext.graph = function () { return graph; };
fakeContext.hasHiddenConnections = function () { return false; };
fakeContext.map = function() {
return {
extent: function() {
return iD.geoExtent([-180, -90], [180, 90]);
}
};
};
var fakeTags = { 'name': 'fake' };
// Set up graph
var createFakeNode = function (id, hasTags) {
return hasTags
? { id: id, type: 'node', tags: fakeTags }
: { id: id, type: 'node' };
? { id: id, type: 'node', loc: [0, 0], tags: fakeTags }
: { id: id, type: 'node', loc: [0, 0] };
};
describe('available', function () {