miragejs / mirage-msw

4 stars 4 forks source link

Bug: mirage-msw no longer respects `timing` config value #6

Closed jasikpark closed 1 year ago

jasikpark commented 1 year ago

I think that https://github.com/bgantzler/mirage-msw/pull/3 may have overriden https://github.com/bgantzler/mirage-msw/commit/fb7c90798fa7cd7582069b78a74b31642c0422ca, since there is no longer an explicit translation between timing and delay?

I'd be happy to submit a pull request, if you can point me in how I might fix things.

I'm seeing mirage-msw not respect my set server timings from an initial config setup.

jasikpark commented 1 year ago

orr.... i can't read

https://github.com/bgantzler/mirage-msw/blob/13c0b4d597534927fa5edf5d9d5aae85ddfc2d9c/lib/msw-config.js#L115

i'm still unsure about my timings setup, since it's using a timing of 0 atm.

cah-brian-gantzler commented 1 year ago

From the code you posted the timing is being passed into MSW. If for some reason that is not working as expected, may have to open an issue with MSW itself

jasikpark commented 1 year ago

it is working as intended, but this.timing is always set to 0 currently, removing the setting makes the delay work with the MSW default

cah-brian-gantzler commented 1 year ago

Yes I believe there was code somewhere when mirageJS was setting 0 as false, ie no timing override, when it should have set undefined, because other code it picking that 0 as an intentional 0.

jasikpark commented 1 year ago

Yes I believe there was code somewhere when mirageJS was setting 0 as false, ie no timing override, when it should have set undefined, because other code it picking that 0 as an intentional 0.

Probably https://github.com/miragejs/miragejs/pull/1080 needs to be merged, I suppose?

rmjohnson-olo commented 1 year ago

@jasikpark just wanted to let you know that https://github.com/miragejs/miragejs/pull/1080 has been merged and it looks like has been released with https://github.com/miragejs/miragejs/releases/tag/v0.1.48 🎉

IanVS commented 1 year ago

I think this is no longer a problem in this package.