reset

  • function
 

Reset the fixture store.

store.reset()

store.reset() resets the store to contain its original data. This is useful for making tests that operate independently.

Basic Example

After creating a taskStore and hooking it up to a task model in the "Basic Example" in store's docs, a test might create several tasks like:

new Task({name: "Take out trash", ownerId: 5}).save();

But, another test might need to operate on the original set of tasks created by can.fixture.store. Reset the task store with:

taskStore.reset()