Closed dpogue closed 7 years ago
Sorry about that. What version of Node? I might inadvertently be using a feature not in old versions.
On Feb 6, 2017 2:34 PM, "Darryl Pogue" notifications@github.com wrote:
Started running into failing tests when I upgraded fakeIDB this morning:
beforeEach(function(done) { let dbReq = fakeIndexedDB.open('storage', 2);
dbReq.onerror = (e) => { console.error(e); done(dbReq.error); };
dbReq.onupgradeneeded = (e) => { dbReq.result.createObjectStore('test', { keyPath: 'key' }); };
dbReq.onsuccess = (e) => { let txn = dbReq.result.transaction(['test'], 'readwrite'); let os = txn.objectStore('test');
let p = os.put({key: 'name', value: 'test'}); // <-- FAILING
p.onsuccess = () => {
dbReq.result.close();
done();
};
}; });
The put call is now throwing DataCloneError: The data being stored could not be cloned by the internal structured cloning algorithm.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/dumbmatter/fakeIndexedDB/issues/17, or mute the thread https://github.com/notifications/unsubscribe-auth/AAyk2MSWUt3kJuNNLsIolH0aX1gfZC7uks5rZ3XIgaJpZM4L4nr_ .
It's node 7, but I'm running in PhantomJS (which is lacking several things, which is partly why we're using fakeIndexedDB 😢). I do have a ES6 Map/Set polyfill.
It does now require a Map/Set polyfill in PhantomJS, when previously it did not. But there was also another incompatibility related to PhantomJS having a really old ArrayBuffer implementation that I didn't realize. That's fixed now in v1.0.11. Thanks for the bug report!
Thanks!! v1.0.11 is working :)
Started running into failing tests when I upgraded fakeIDB this morning:
The
put
call is now throwingDataCloneError: The data being stored could not be cloned by the internal structured cloning algorithm.