Some tests to write:
- On initialization, if the record is already in the local DB, the signal is sent with the URI
- When the sync event has a created record, its attachment is downloaded
- When the sync event has an updated record, its attachment is downloaded
- When the sync event downloads an attachment, a signal is sent with the URI
https://firefox-source-docs.mozilla.org/services/common/services/RemoteSettings.html#unit-tests
In order to verify that a signal was sent:
const promiseSignal = TestUtils.topicObserved("psl-updated");
client.emit("sync", {...});
const observed = await promiseSignal;
console.log(observed); // --> fileURI somewhere, [0] ? :)