Skip to content

Commit

Permalink
Lint and mock other unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
karimnaaji committed Mar 4, 2021
1 parent 5e88441 commit 31ced0c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/terrain/terrain.js
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,7 @@ export class Terrain extends Elevation {

getMinElevationBelowMSL(): number {
let min = 0;
this._visibleDemTiles.filter(tile => tile.dem).map(tile => {
this._visibleDemTiles.filter(tile => tile.dem).forEach(tile => {
const minMaxTree = (tile.dem: any).tree;
min = Math.min(min, minMaxTree.minimum);
});
Expand Down
9 changes: 7 additions & 2 deletions test/unit/geo/transform.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,7 @@ test('transform', (t) => {
}
return true;
},
getMinElevationBelowMSL: () => 0
};
};

Expand All @@ -424,6 +425,7 @@ test('transform', (t) => {
}
return true;
},
getMinElevationBelowMSL: () => 0
};
};

Expand All @@ -438,6 +440,7 @@ test('transform', (t) => {
}
return true;
},
getMinElevationBelowMSL: () => 0
};
};

Expand Down Expand Up @@ -551,7 +554,8 @@ test('transform', (t) => {
},
exaggeration() {
return 10; // Low tile zoom used, exaggerate elevation to make impact.
}
},
getMinElevationBelowMSL: () => 0
};
transform.elevation = elevation;
transform.resize(200, 200);
Expand Down Expand Up @@ -1157,7 +1161,8 @@ test('transform', (t) => {
transform._elevation = {
getAtPoint: () => groundElevation,
exaggeration: () => 1.0,
raycast: () => undefined
raycast: () => undefined,
getMinElevationBelowMSL: () => 0
};

const expected = new FreeCameraOptions();
Expand Down

0 comments on commit 31ced0c

Please sign in to comment.