Community Forum

Ask a Question
Back to All

Mocking the 'root' object?

Hi,

In our unit-testing-code.js, we're trying to test some code which accesses a datastore, as in the example:

await root.dataStores.store('data_store_key').find();

Unfortunately, the root object is always undefined.

Am I failing to setup the test correctly?

Thanks