MCPcopy Create free account
hub / github.com/ampproject/amphtml / overwriteUnsupported

Function overwriteUnsupported

build-system/tasks/e2e/expect.js:243–256  ·  view source on GitHub ↗

* @param {Chai.AssertionStatic} _super * @return {function(): *}

(_super)

Source from the content-addressed store, hash-verified

241 * @return {function(): *}
242 */
243function overwriteUnsupported(_super) {
244 return function () {
245 // @ts-ignore
246 const that = this;
247 const obj = that._obj;
248 const isControllerPromise = obj instanceof ControllerPromise;
249 if (isControllerPromise) {
250 throw new Error(
251 'ControllerPromise used with unsupported expectation. Await the Promise and expect the value.'
252 );
253 }
254 return _super.apply(that, arguments);
255 };
256}
257
258/**
259 * @param {*} _networkLogger

Callers

nothing calls this directly

Calls 1

applyMethod · 0.80

Tested by

no test coverage detected