should not return ls.prototype.key

This commit is contained in:
AJ ONeal 2013-01-25 21:12:55 -07:00
parent c8bdb31e84
commit a0cd89a7c7
1 changed files with 3 additions and 0 deletions

View File

@ -5,6 +5,9 @@
, localStorage = require('localStorage') , localStorage = require('localStorage')
; ;
// don't return prototypical things
assert.strictEqual(localStorage.getItem('key'), null);
// can't make assuptions about key positioning // can't make assuptions about key positioning
localStorage.setItem('a', 1); localStorage.setItem('a', 1);
assert.strictEqual(localStorage.key(0), 'a'); assert.strictEqual(localStorage.key(0), 'a');