Skip to content

Serializing (and restoring) the state of Fake IDB #91

@joshdifabio

Description

@joshdifabio

I have the following use case for some automated tests:

  1. Run a JS application which reads/writes various data from/to Fake IDB
  2. Serialize the complete state of Fake IDB (e.g. to JSON)
  3. In a new context, rehydrate Fake IDB using the previous serialized state
  4. Run a JS application which reads/writes various data from/to Fake IDB, leveraging the state captured in step 2

Is there an easy way to achieve this with Fake IDB, or do I need to manually read/write all of the databases and objects using the regular IDB APIs?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions