Skip to content

Implement purging of memory database #53

Description

@Raynos

Something like

resourceful.purge = function () {
  Object.keys(this.resources).forEach(function (key) {
    var resource = resourceful.resources[key];
    resource.connection.store = {};
  });
};

This will kill the attached memory store for every resource.

This is only useful for unit testing when you want to make sure your memory store is clean for your parallel unit tests.

It would be stupid to use this in production.

I'm not sure whether is "useful enough" to add to resourceful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions