(optionalChaining)
| 124 | * @returns {RuntimeTemplate} runtime template |
| 125 | */ |
| 126 | const create = (optionalChaining) => |
| 127 | new RuntimeTemplate( |
| 128 | /** @type {import("../lib/Compilation")} */ ( |
| 129 | /** @type {unknown} */ (undefined) |
| 130 | ), |
| 131 | /** @type {OutputOptions} */ ( |
| 132 | /** @type {unknown} */ ({ environment: { optionalChaining } }) |
| 133 | ), |
| 134 | new RequestShortener(__dirname) |
| 135 | ); |
| 136 | |
| 137 | it("uses optional chaining when supported", () => { |
| 138 | const runtimeTemplate = create(true); |
no outgoing calls
no test coverage detected