Help with TWebIndexedDbClientDataset.Init in tests

Hello all,
I have a TWebDataModule that holds my TWebIndexedDbClientDataset's. Whwn running the program this works:

dmDashboard := TdmDashboard.Create(frmDashboard);
dmDashboard.InitDataSets;

with InitDatasets as:

procedure TdmDashboard.InitDataSets;
begin
CUT := TdmDashboard.Create(nil);
CUT.InitDataSets;

The test framework throws exception

Uncaught TypeError: Cannot read properties of undefined (reading 'length')
at Object.DoUpgradeNeeded (WEBLib.IndexedDb.pas:335:33)
at IDBOpenDBRequest.cb (rtl.js:271:1)

How do I init datasets in this settings.

Thanks in advance
Gary

Do you have more details about how you use it when it works and what exactly you do in the "test framework"? With this limited information, I cannot understand what exactly you are doing.