Implement Web Storage API on Native

You could potentially add two sub-scopes to your suite “should write a local file” - “PUT returns success code”, and “local file exists with contents”.

That way, you can separate out what are really two different things to verify - that The XHRRequest succeeds, and that the file itself is properly being written - while still keeping a cohesive test suite. It will also allow you to add setup and tear down logic that can prevent missing files from hanging things :slightly_smiling_face:

Ed: forgot to add, this is some good work!

I think you mis-understood. The problem is not so much with the structure of the test, but with the code itself. The code currently only writes the file when the already exists.

It rangs otherwise, even when there is not a later get.

Ah you’re right I did misunderstand.

The behavior sounds suspiciously like there’s an unfulfilled promise lying around somewhere. Since it only happens when the file doesn’t exist, I’d wager that the promise isn’t being fulfilled because Promise.reject never gets called.

HTH!