This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// msw-utils.ts | |
import { rest, RestHandler } from 'msw' | |
import { afterEach } from 'vitest' | |
import sinon from 'sinon' | |
/** | |
* Creates an MSW POST handler that will throw in afterEach | |
* if the actual request body doesn’t deep-equal the expected one, | |
* using Sinon for comparison. | |
*/ |
OlderNewer