Skip to content

Rewrite Entwine/PointCloudLayer tests #2645

@Neptilo

Description

@Neptilo

This issue is a feature proposal. Feel free to upvote (with 👍 ), comment and provide your use-cases if you're interested in this feature.

Context

The entwine.js unit tests are fragile: they often break after changes unrelated to point clouds.
What's more, the intention of some tests is not clear.

Description of the proposal

The tests in entwine.js, in particular "Entwine Point Tile Layer tries to update on the root and fails/succeeds" are brittle and their intention is not clear. Additionally, they are more testing functionality of PointCloudLayer that is not specific to Entwine point clouds.

Implementation

Proposed improvements:

  • to decouple PointCloudLayer tests from Entwine-specific tests, mocking the point cloud data in the first case.
  • not to rely on complex camera navigation functions like GlobeControls.lookAtCoordinate, whose behavior can affect the test result and is irrelevant to testing point clouds.
  • the "tries to update on the root and fails" needs to be more precise about what case it is testing (and should test all of these cases): the case where nothing is returned, or null, or where an error is thrown and the promise doesn't resolve.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions