Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Fix tests for PointerMap API
Browse files Browse the repository at this point in the history
Fixes gh-196
  • Loading branch information
scottgonzalez committed Jun 12, 2015
1 parent 8c6d453 commit efce89d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions src/pointermap.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
* This module implements an map of pointer states
*/
var USE_MAP = window.Map && window.Map.prototype.forEach;
function PointerMap() {
return USE_MAP ? new Map() : new SparseArrayMap();
}
var PointerMap = USE_MAP ? Map : SparseArrayMap;

function SparseArrayMap() {
this.array = [];
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/pointermap.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ define([
'clear',
'forEach'
];
var e = expect(PointerMap.prototype);
var p = new PointerMap();
keys.forEach(function(k) {
e.to.have.ownProperty(k);
expect(p).to.have.property(k);
});
});
test('PointerMap .set', function() {
Expand Down

0 comments on commit efce89d

Please sign in to comment.