Skip to content

Commit 31baa28

Browse files
committed
Update test to ensure JSON-encoded strings work
1 parent c9fdbbe commit 31baa28

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

test/test.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,18 @@ describe('CrossStorageClient', function() {
238238
})['catch'](done);
239239
});
240240

241+
it('can set JSON objects as the value', function(done) {
242+
var key = 'key1';
243+
var str = JSON.stringify({foo: 'bar'});
244+
245+
storage.onConnect()
246+
.then(setGet(key, str))
247+
.then(function(res) {
248+
expect(res).to.eql(str);
249+
done();
250+
})['catch'](done);
251+
});
252+
241253
it('can overwrite existing values', function(done) {
242254
var key = 'key1';
243255
var value = 'new';

0 commit comments

Comments
 (0)