jest-dynalite icon indicating copy to clipboard operation
jest-dynalite copied to clipboard

Dynalite Limitations

Open jimjeffers opened this issue 4 years ago • 3 comments

Happy New Year! This library looks great as I've been having headaches disabling parallelism in jest. I was configuring my project to use your preset and after trial and error realized that Dynalite doesn't support transactions! A huge portion of my codebase utilizes TransacteWrite. Do you have a work around for code that utilizes transactions or would you simply not use this lib in my case?

jimjeffers avatar Jan 02 '21 01:01 jimjeffers

Hey! Looks like there is already a PR open for dynalite which needs some work https://github.com/mhart/dynalite/pull/129. It's not something I have a specific work around for.

freshollie avatar Jan 02 '21 10:01 freshollie

@freshollie thanks. I will give this another try whenever dynalite releases transactions. In the mean time switching back to jest-dynamodb will work albeit not as good. For anyone stuck you can get turn off parallelism via jest --runInBand but the tests will be slower AND you will have to manually clear your tables after each test suite. Fortunately it's pretty painless to switch between these two libraries.

jimjeffers avatar Jan 02 '21 18:01 jimjeffers

Try this in your package.json

  "resolutions": {
    "dynalite": "github:c-py/dynalite"
  },

revmischa avatar Jul 19 '23 02:07 revmischa