Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raise test coverage #49

Merged
merged 4 commits into from
Oct 18, 2015
Merged

Raise test coverage #49

merged 4 commits into from
Oct 18, 2015

Conversation

seriema
Copy link
Owner

@seriema seriema commented Oct 18, 2015

From 97.2% to 100%.

  • Removed unnecessary guard clauses in things I borrowed from AngularJS
    source code (mostly for IE8 support).
  • Used $filter instead of manually removing elements from array in
    removeFallback().
  • Disable video and screenshots on SauceLabs as the tests aren't visual.
  • Added tests to better flex the query handling feature in Handle queries (i.e. "?name=Pikachu") #23.
    • Testing array of objects.
    • Undefined and empty URL param values.
    • Date-type in params object.
  • Fix: toISOString support on dates in IE8
  • Fix: normalize file paths for empty query params

Closes #44
Fixes #51, #48

@seriema seriema force-pushed the chore-44-raise-test-coverage branch from 73db7b5 to 11fa90f Compare October 18, 2015 13:43
From 97.2% to 100%.

* Removed unnecessary guard clauses in things I borrowed from AngularJS
source code (mostly for IE8 support).
* Used $filter instead of manually removing elements from array in
removeFallback().
* Disable video and screenshots on SauceLabs as the tests aren't visual.
* Added tests to better flex the query handling feature in #23.
** Testing array of objects.
** Undefined and empty URL param values.
** Date-type in params object.

Closes #44
@seriema seriema force-pushed the chore-44-raise-test-coverage branch from 11fa90f to 3a430f4 Compare October 18, 2015 15:04
We used Date.prototype.toISOString(), which wasn’t supported on IE8.

Reference:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global
_Objects/Date/toISOString

Fixes #51
@seriema seriema force-pushed the chore-44-raise-test-coverage branch from 3a430f4 to 3a1ac50 Compare October 18, 2015 15:06
Empty/undefined query param values won’t be included in the mock data
file path. They were inconsistent anyway.

Fixes #48
@seriema seriema changed the title test(apimock): raise test coverage Raise test coverage Oct 18, 2015
@@ -68,7 +69,28 @@ angular.module('apiMock', [])
return keys;
}

// Taken from Angular 1.4.x: https://github.com/angular/angular.js/blob/f13852c179ffd9ec18b7a94df27dec39eb5f19fc/src/Angular.js#L296
// TODO: IE8: remove when we drop IE8/Angular 1.2 support.

Choose a reason for hiding this comment

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

Why IE8 support? For coverage?

Copy link
Owner Author

Choose a reason for hiding this comment

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

The hint is right there in the comment: we support Angular 1.2. So then we need to support whatever browsers it supports, which includes IE8.

Choose a reason for hiding this comment

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

Fair enough!

Copy link
Owner Author

Choose a reason for hiding this comment

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

👍

seriema added a commit that referenced this pull request Oct 18, 2015
@seriema seriema merged commit f4ffd61 into master Oct 18, 2015
@seriema seriema deleted the chore-44-raise-test-coverage branch October 18, 2015 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants