| 184 | JSBridgeTestFixture::SetUp(); |
| 185 | if (IsSkipped()) { |
| 186 | return; |
| 187 | } |
| 188 | auto* jsBridge = getJsBridge(); |
| 189 | wrapper = RuntimeWrapper(jsBridge, getTSNMode()); |
| 190 | } |
| 191 | |
| 192 | void TearDown() override { |
| 193 | wrapper.teardown(); |
| 194 | } |
| 195 | |
| 196 | TSNMode getTSNMode() const { |
| 197 | return isWithTSN() ? TSNMode::Enabled : TSNMode::Disabled; |
| 198 | } |
| 199 | |
| 200 | RuntimeWrapper wrapper; |
| 201 | }; |
| 202 | |
| 203 | static Result<Value> getJsModuleWithSchema( |
| 204 | Runtime* runtime, |
| 205 | const std::shared_ptr<snap::valdi_core::JSRuntimeNativeObjectsManager>& nativeObjectsManager, |
| 206 | ValueSchemaRegistry* registry, |
| 207 | std::string_view moduleName, |
| 208 | const ValueSchema& schema) { |
| 209 | auto resolvedSchema = schema; |
| 210 | if (registry != nullptr) { |
| 211 | ValueSchemaTypeResolver typeResolver(registry); |
| 212 | auto schemaResult = typeResolver.resolveTypeReferences(schema); |
no test coverage detected