(original: Procedure | Constructable)
| 628 | ]) |
| 629 | |
| 630 | function getAllProperties(original: Procedure | Constructable) { |
| 631 | const properties = new Set<string | symbol>() |
| 632 | const descriptors: Record<string | symbol, PropertyDescriptor | undefined> |
| 633 | = {} |
| 634 | while ( |
| 635 | original |
| 636 | && original !== Object.prototype |
| 637 | && original !== Function.prototype |
| 638 | ) { |
| 639 | const ownProperties = [ |
| 640 | ...Object.getOwnPropertyNames(original), |
| 641 | ...Object.getOwnPropertySymbols(original), |
| 642 | ] |
| 643 | for (const prop of ownProperties) { |
| 644 | if (descriptors[prop] || ignoreProperties.has(prop)) { |
| 645 | continue |
| 646 | } |
| 647 | properties.add(prop) |
| 648 | descriptors[prop] = Object.getOwnPropertyDescriptor(original, prop) |
| 649 | } |
| 650 | original = Object.getPrototypeOf(original) |
| 651 | } |
| 652 | return { |
| 653 | properties, |
| 654 | descriptors, |
| 655 | } |
| 656 | } |
| 657 | |
| 658 | function getDefaultConfig(original?: Procedure | Constructable): MockConfig { |
| 659 | return { |
no test coverage detected