MCPcopy Create free account
hub / github.com/Snapchat/Valdi / getJsModuleWithSchema

Function getJsModuleWithSchema

valdi/test/integration/Runtime_tests.cpp:156–184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

154 explicit TestValueTypedProxyObject(const Ref<ValueTypedObject>& typedObject) : ValueTypedProxyObject(typedObject) {}
155 std::string_view getType() const final {
156 return "Test Proxy";
157 }
158};
159
160struct TestViewNodesAssetTracker : public IViewNodesAssetTracker {
161public:
162 std::atomic_int beganRequestCount = 0;
163 std::atomic_int endRequestCount = 0;
164 std::atomic_int changedCount = 0;
165
166 void onBeganRequestingLoadedAsset(RawViewNodeId viewNodeId, const Ref<Asset>& asset) override {
167 beganRequestCount++;
168 }
169
170 void onEndRequestingLoadedAsset(RawViewNodeId viewNodeId, const Ref<Asset>& asset) override {
171 endRequestCount++;
172 }
173
174 void onLoadedAssetChanged(RawViewNodeId viewNodeId,
175 const Ref<Asset>& asset,
176 const std::optional<Valdi::StringBox>& error) override {
177 changedCount++;
178 }
179};
180
181class RuntimeFixture : public JSBridgeTestFixture {
182protected:
183 void SetUp() override {
184 JSBridgeTestFixture::SetUp();
185 if (IsSkipped()) {
186 return;
187 }

Callers 2

TEST_PFunction · 0.85

Calls 8

getGlobalFunction · 0.85
setCurrentSchemaMethod · 0.80
getJavaScriptRuntimeMethod · 0.80
makeStringMethod · 0.80
getMethod · 0.65
ErrorInterface · 0.50
resolveTypeReferencesMethod · 0.45

Tested by

no test coverage detected