github.com/iqoqo/nomad@v0.11.3-0.20200911112621-d7021c74d101/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 }