MCPcopy
hub / github.com/webpack/webpack-dev-server / get

Function get

test/ports-map.js:102–118  ·  view source on GitHub ↗
(target, name)

Source from the content-addressed store, hash-verified

100
101export default new Proxy(ports, {
102 get(target, name) {
103 if (!target[name]) {
104 throw new Error(
105 `Requested "${name}" port(s) for tests not found, please update "test/ports-map.js".`,
106 );
107 }
108
109 if (busy[name]) {
110 throw new Error(
111 `The "${name}" port is already in use in another test, please add a new one.`,
112 );
113 }
114
115 busy[name] = true;
116
117 return target[name];
118 },
119});

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected