Skip to content

Commit 718abbb

Browse files
committedDec 28, 2020
[Tests] increase coverage
1 parent 5039df8 commit 718abbb

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed
 

‎implementation.js

+2-4
Original file line numberDiff line numberDiff line change
@@ -77,19 +77,17 @@ define(MapShimPrototype, {
7777
entry = SLOT.get(this, '[[storage]]')[fkey];
7878
if (entry) {
7979
return entry.value;
80-
} else {
81-
return void undefined;
8280
}
81+
return void undefined;
8382
}
8483
var map = SLOT.get(this, '[[map]]');
8584
if (map) {
8685
// fast object key path
8786
entry = origMapGet(map, key);
8887
if (entry) {
8988
return entry.value;
90-
} else {
91-
return void undefined;
9289
}
90+
return void undefined;
9391
}
9492
var head = SLOT.get(this, '[[head]]');
9593
var i = head;

‎test/tests.js

+6
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,12 @@ module.exports = function (Map, t) {
5555
st.end();
5656
});
5757

58+
t.test('throws when `.call`ed with an existing instance', function (t) {
59+
var map = new Map();
60+
t['throws'](function () { Map.call(map); });
61+
t.end();
62+
});
63+
5864
t.test('should accept an iterable as argument', function (st) {
5965
var map = new Map();
6066
testMapping(st, map, 'a', 'b', 'add "a"->"b" to map');

0 commit comments

Comments
 (0)
Please sign in to comment.