我創建了這個類:export class ErrorList { public HostelNotFoundError(details: ErrorDetail): FunctionalError { return new FunctionalError('1', 'Can\'t find this hostel', details); }并在服務中:throw new ErrorList().HostelNotFoundError({} });我想知道在 Jest 中是否可以執行以下操作:rejects.toThrow(HostelNotFoundError);
rejects.toThrow in Jest
慕神8447489
2022-10-13 19:16:55