Skip to content
This repository has been archived by the owner on Mar 8, 2023. It is now read-only.

MINOR: Fix error message on Datasource connection failure. #2124

Merged
merged 2 commits into from
Feb 26, 2021

Conversation

atomicsulfate
Copy link
Collaborator

Caught error might be just a string from a rejected promise.

@codecov
Copy link

codecov bot commented Feb 25, 2021

Codecov Report

Merging #2124 (e0259d7) into master (e3a9ec3) will decrease coverage by 0.00%.
The diff coverage is 50.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2124      +/-   ##
==========================================
- Coverage   67.68%   67.68%   -0.01%     
==========================================
  Files         298      298              
  Lines       26384    26386       +2     
  Branches     5968     5971       +3     
==========================================
+ Hits        17858    17859       +1     
- Misses       8526     8527       +1     
Impacted Files Coverage Δ
@here/harp-mapview/lib/MapView.ts 73.48% <0.00%> (-0.23%) ⬇️
...-vectortile-datasource/lib/VectorTileDataSource.ts 71.59% <100.00%> (+2.62%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e3a9ec3...e0259d7. Read the comment docs.

Caught error might be just a string from a rejected promise.

Signed-off-by: Andres Mandado <andres.mandado-almajano@here.com>
@@ -13,7 +13,10 @@ import { TileKey } from "@here/harp-geoutils";
import { DataProvider } from "@here/harp-mapview-decoder";
import { GeoJsonTiler } from "@here/harp-mapview-decoder/index-worker";
import { silenceLoggingAroundFunction } from "@here/harp-test-utils";
import { assert } from "chai";
import * as chai from "chai";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks interessting :) .. can you add a comment why its needed

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment added. chai-as-promised is a chai plugin to support assertions on promises, to install it you need to import chai, then the plugin, and finally do chai.use(chai_as_promised). We already use it in other test suites.

@atomicsulfate atomicsulfate merged commit 1ce7e36 into master Feb 26, 2021
@atomicsulfate atomicsulfate deleted the MINOR_FixDSConnectErrorMsg branch February 26, 2021 15:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants