github.com/Ilhicas/nomad@v1.0.4-0.20210304152020-e86851182bc3/ui/tests/utils/push-payload-to-store.js (about) 1 import { run } from '@ember/runloop'; 2 3 // These are private store methods called by store "finder" methods. 4 // Useful in unit tests when there is store interaction, since calling 5 // adapter and serializer methods directly will never insert data into 6 // the store. 7 export default function pushPayloadToStore(store, payload, modelName) { 8 run(() => { 9 store._push(payload); 10 store._didUpdateAll(modelName); 11 }); 12 }