| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 5d48011 commit d5f4d98
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -143,17 +143,14 @@ throws( | |||
| 143 | 143 | { code: 'ERR_INVALID_THIS' } | |
| 144 | 144 | ); | |
| 145 | 145 | ||
| 146 | - throws( | ||
| 147 | - () => Reflect.get(EventEmitterAsyncResource.prototype, 'asyncId', {}), | ||
| 148 | - { code: 'ERR_INVALID_THIS' } | ||
| 149 | - ); | ||
| 150 | - | ||
| 151 | - throws( | ||
| 152 | - () => Reflect.get(EventEmitterAsyncResource.prototype, 'triggerAsyncId', {}), | ||
| 153 | - { code: 'ERR_INVALID_THIS' } | ||
| 154 | - ); | ||
| 155 | - | ||
| 156 | - throws( | ||
| 157 | - () => Reflect.get(EventEmitterAsyncResource.prototype, 'asyncResource', {}), | ||
| 158 | - { code: 'ERR_INVALID_THIS' } | ||
| 159 | - ); | ||
| 146 | + ['asyncId', 'triggerAsyncId', 'asyncResource'].forEach((getter) => { | ||
| 147 | + throws( | ||
| 148 | + () => Reflect.get(EventEmitterAsyncResource.prototype, getter, {}), | ||
| 149 | + { | ||
| 150 | + code: 'ERR_INVALID_THIS', | ||
| 151 | + name: /TypeError/, | ||
| 152 | + message: 'Value of "this" must be of type EventEmitterAsyncResource', | ||
| 153 | + stack: new RegExp(`at get ${getter}`) | ||
| 154 | + } | ||
| 155 | + ); | ||
| 156 | + }); | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments