60e2149072
Tasks 16-20: Online Board Tests (Search/Filter, Tabs, Flight List, Details Modal, Time/Date) - Task 16: Search & Filter tests (37 tests) - departure/arrival cities, passenger count, cabin class - Task 17: Arrival/Departure Tabs tests (45 tests) - tab switching, flight display, sorting - Task 18: Flight List View tests (50 tests) - display, sorting, filtering, pagination, loading states - Task 19: Flight Details Modal tests (40 tests) - opening/closing, content display, actions - Task 20: Time & Date Filter tests (43 tests) - date selection, time ranges, calendar navigation Tasks 21-25: Flight Details Tests (Flight Info, Passengers, Seats, Services, Fares) - Task 21: Flight Info Display tests (40 tests) - basic info, airports, route visualization, timeline - Task 22: Passenger Info tests (50 tests) - passenger list, details, services, special requirements - Task 23: Seat Selection tests (50 tests) - seat map, selection, categories, recommendations - Task 24: Service Selection tests (25 tests) - baggage, meals, seats, summary - Task 25: Fare Display tests (55 tests) - fare breakdown, comparisons, discounts, refunds All tests follow AAA pattern and use data-testid selectors matching Angular version. Total: 245 tests across 10 feature suites.
52 lines
1.8 KiB
TypeScript
52 lines
1.8 KiB
TypeScript
/**
|
|
Create an error from multiple errors.
|
|
*/
|
|
declare class AggregateError<T extends Error = Error> extends Error implements Iterable<T> {
|
|
readonly name: 'AggregateError';
|
|
|
|
/**
|
|
@param errors - If a string, a new `Error` is created with the string as the error message. If a non-Error object, a new `Error` is created with all properties from the object copied over.
|
|
@returns An Error that is also an [`Iterable`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Iterators_and_Generators#Iterables) for the individual errors.
|
|
|
|
@example
|
|
```
|
|
import AggregateError = require('aggregate-error');
|
|
|
|
const error = new AggregateError([new Error('foo'), 'bar', {message: 'baz'}]);
|
|
|
|
throw error;
|
|
|
|
// AggregateError:
|
|
// Error: foo
|
|
// at Object.<anonymous> (/Users/sindresorhus/dev/aggregate-error/example.js:3:33)
|
|
// Error: bar
|
|
// at Object.<anonymous> (/Users/sindresorhus/dev/aggregate-error/example.js:3:13)
|
|
// Error: baz
|
|
// at Object.<anonymous> (/Users/sindresorhus/dev/aggregate-error/example.js:3:13)
|
|
// at AggregateError (/Users/sindresorhus/dev/aggregate-error/index.js:19:3)
|
|
// at Object.<anonymous> (/Users/sindresorhus/dev/aggregate-error/example.js:3:13)
|
|
// at Module._compile (module.js:556:32)
|
|
// at Object.Module._extensions..js (module.js:565:10)
|
|
// at Module.load (module.js:473:32)
|
|
// at tryModuleLoad (module.js:432:12)
|
|
// at Function.Module._load (module.js:424:3)
|
|
// at Module.runMain (module.js:590:10)
|
|
// at run (bootstrap_node.js:394:7)
|
|
// at startup (bootstrap_node.js:149:9)
|
|
|
|
|
|
for (const individualError of error) {
|
|
console.log(individualError);
|
|
}
|
|
//=> [Error: foo]
|
|
//=> [Error: bar]
|
|
//=> [Error: baz]
|
|
```
|
|
*/
|
|
constructor(errors: ReadonlyArray<T | {[key: string]: any} | string>);
|
|
|
|
[Symbol.iterator](): IterableIterator<T>;
|
|
}
|
|
|
|
export = AggregateError;
|