Closed tjosepo closed 3 weeks ago
I think it's a great start to get it working in the browser. Only it doesn't appear to work when using @vitest/browser for me but appears to be related to mswjs itself. Need to play around a bit with that.
I tested my changes on Chrome using a small OpenAPI spec. It worked. Didn't try it with @vitest/browser
.
I think it's a great start to get it working in the browser. Only it doesn't appear to work when using @vitest/browser for me but appears to be related to mswjs itself. Need to play around a bit with that.
I tested my changes on Chrome using a small OpenAPI spec. It worked. Didn't try it with
@vitest/browser
.
I think this because in Vitest you typically try to use the Node version instead of the browser version needed for @vitest/browser
. At least for me it's try to look for mswjs/node
I've added a simple browser test using @vitest/browser
. It passes locally 🎉
Awesome great work! 🚀
This has been released in v0.3.0!
Make sure to always update to the latest version (npm i @mswjs/source@latest
) to get the newest features and bug fixes.
Predictable release automation by @ossjs/release.
Closes #49
Changes
import { STATUS_CODES } from 'node:http'
withimport { STATUS_CODES } from './status-codes.js'
, this way, we don't depend on Node internals.@apidevtools/swagger-parser
with a custom JSON Schema dereferencing function that works on the browser@stoplight/json
directly was simpler. With a bit of recursion, the dereferencing algorithm really wasn't that bad.