Skip to content
This repository has been archived by the owner on Dec 1, 2020. It is now read-only.

Unit tests for esri.core services #150

Merged
merged 3 commits into from
Nov 16, 2015
Merged

Unit tests for esri.core services #150

merged 3 commits into from
Nov 16, 2015

Conversation

tomwayson
Copy link
Member

Resolves #146

Couldn't get tests to work for esriMapUtils.createWebMap(), but those can be added later. Otherwise I'm happy w/ the tests for the loader and map and layer utils.

@jwasil please review and merge at will.

add unit tests for esriMapUtils:
- check for mapOptions before normalizing extent
- fixed thumbnailurl typo in test/site pages
- test for normailzed extent
- TODO: tests for createWebMap fail

also added ngdocs for esriMapUtils

added tests for esriLoader.require
- TODO: tests for esriLoader.bootstrap()?

esriLayerUtils tests now use mock deferred

added tests for esriRegistry
gulp test now runs unit tests in chrome and
generates an istanbul code coverage report in test/unit/coverage
@jwasilgeo
Copy link
Contributor

@tomwayson reviewing now and will push some stuff soon. You'll love the "fix" to get createWebMap tests running.

EDIT: Well, hold on, maybe something I noticed was actually on purpose. In-line comment forthcoming in a few seconds...

… (partially for my own education of unit testing in this repo)
});

// TODO: tests for create web map not working
xdescribe('createWebMap', function() {
Copy link
Contributor

Choose a reason for hiding this comment

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

@tomwayson was "xdescribe" on purpose to stop these tests from running? I played around with these and also couldn't get the actual expects to show up in the test runners either way.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah. Just skipping this until we figure out the issue. Also, I was thrashing around a bit trying different ways of getting it working and it doesn't even look like I checked in the code I expected to work.

Copy link
Contributor

Choose a reason for hiding this comment

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

Understood, thanks. Safe to go ahead and merge, or does that mean you might want to add some more?

tomwayson added a commit that referenced this pull request Nov 16, 2015
Unit tests for esri.core services
@tomwayson tomwayson merged commit d97ce33 into master Nov 16, 2015
@tomwayson tomwayson deleted the more-unit-tests branch November 16, 2015 19:24
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.

2 participants