dexie-mongoify icon indicating copy to clipboard operation
dexie-mongoify copied to clipboard

Sort tests failing on master

Open cyphercider opened this issue 4 years ago • 4 comments
trafficstars

I was just trying to familiarize myself with the codebase to work on the fulltext search item, but after doing a fresh clone of master and doing npm run test, the three $sort operator tests fail.

I tried putting some console logs in the sort operator function, but I can't get the logs to show up. Probably because I don't understand something with Karma. This option didn't lead to the logs showing up:

browserConsoleLogOptions: {
  level: 'log'
},

By the way, would you be open to a PR to update all dependencies, and possibly implement some typings?

image

cyphercider avatar Nov 22 '20 20:11 cyphercider

I'd rather fix sorting issue first. Any idea why that happens?

YurySolovyov avatar Nov 24 '20 12:11 YurySolovyov

Hi @YurySolovyov , I haven't dug into it yet - can you confirm if it is happening for you also? Since the Dexie peer dep of this lib is >= 1.3, but Dexie is now at Dexie 3.x, I thought maybe some breaking change had affected the tests. (assuming they were passing as of the last commit on master).

cyphercider avatar Nov 24 '20 12:11 cyphercider

I think if you run

npm run test:debug

it will open browser window with failing tests and you should be able to set a breakpoint in debugger to see why/when/here sorting fails.

YurySolovyov avatar Nov 24 '20 12:11 YurySolovyov

I did try that, but none of the breakpoints worked. It may be because my launch config in vscode needs to be modified. I wanted to get confirmation that I'm not the only one getting the failures before I jump in though.

cyphercider avatar Nov 24 '20 13:11 cyphercider