Fixed mock instantiation

This mock will fail by default now, which stops us from adding bad data in prod.
This commit is contained in:
Fabien "egg" O'Carroll 2023-01-20 17:01:02 +07:00 committed by Fabien 'egg' O'Carroll
parent 833182bc7f
commit 68f469c78b

View File

@ -62,29 +62,23 @@ module.exports = {
this.controller.init({api});
const addMocks = () => {
if (!urlService.hasFinished()) {
setTimeout(addMocks, 100);
return;
}
this.controller.receive({
data: {
source: 'https://brid.gy/repost/twitter/KiaKamgar/1615735511137624064/1615738476875366401',
target: 'https://ronald.com/pizza/',
extra: 'data'
target: 'https://valid-url-for-your.site'
}
});
this.controller.receive({
data: {
source: 'https://slrpnk.net/post/222314',
target: 'https://ronald.com/thing/',
extra: 'data'
}
});
return;
};
this.controller.receive({
data: {
source: 'https://lobste.rs/s/eq4f9d',
target: 'https://ronald.com/whatever/',
extra: 'data'
}
});
addMocks();
const sendingService = new MentionSendingService({
discoveryService,