Improve tests a little bit
This commit is contained in:
@ -54,9 +54,7 @@ export class ListenerRss extends EventEmitter {
|
||||
* @return return a promise with the received data
|
||||
*/
|
||||
fetchRSS(): Promise<Parser.Output<any>> {
|
||||
return this.parser.parseURL(this.address).catch((err) => {
|
||||
throw new Error("bad address or no access : " + err);
|
||||
});
|
||||
return this.parser.parseURL(this.address);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -69,7 +67,7 @@ export class ListenerRss extends EventEmitter {
|
||||
const fun: () => void = () => {
|
||||
this.fetchRSS()
|
||||
.then((obj: { [key: string]: any }) => this.emit("update", obj))
|
||||
.catch((err) => this.emit("update_err", err));
|
||||
.catch((err) => this.emit("error", err));
|
||||
};
|
||||
|
||||
(async () => {
|
||||
|
Reference in New Issue
Block a user