(options)
| 142 | } |
| 143 | |
| 144 | withOptions(options) { |
| 145 | const mergeOptions = (opt) => |
| 146 | Object.assign({}, options, typeof opt === "string" ? { name: opt } : opt); |
| 147 | |
| 148 | return { |
| 149 | name: this.name, |
| 150 | tap: (opt, fn) => this.tap(mergeOptions(opt), fn), |
| 151 | tapAsync: (opt, fn) => this.tapAsync(mergeOptions(opt), fn), |
| 152 | tapPromise: (opt, fn) => this.tapPromise(mergeOptions(opt), fn), |
| 153 | intercept: (interceptor) => this.intercept(interceptor), |
| 154 | isUsed: () => this.isUsed(), |
| 155 | withOptions: (opt) => this.withOptions(mergeOptions(opt)) |
| 156 | }; |
| 157 | } |
| 158 | |
| 159 | isUsed() { |
| 160 | return this.taps.length > 0 || this.interceptors.length > 0; |
no test coverage detected