whenObjectSet(Objects.search().fakeObject().all()).thenReturn(stubSet);
var temp = Objects.search().fakeObject()
var result = await (await myFunctions.testFunction(temp))
I believe Objects.search() doesn’t work in tests and will just return undefined - do you have to take in an object set or could you pass in a list of objects instead? Something like myObject[]
Hey @Jzzz! There is an emulator feature in development that will allow you to mimic a the behavior of queries within a unit test. This emulator will use the data created in your unit test and most queries will just work like you would expect (there will be some functionality that will still require stubbing such as fuzzy searches). This feature should available in beta later this year or early next year.
Hey @a2b027479732f76e99ff so there still ongoing work but it’s mostly focused on the new version that will be based on the OSDK. This solution will likely be released publicly in the first half of this year although this has yet to confirmed as there is still some ongoing debate about what testing infrastructure for OSDK backed functions will look like.
In the meantime, if getting access to the current OSS emulator is important for your existing functions codebase, I can reach out through email or you can reach out to your palantir representative.