cloudflare-typescript-workers icon indicating copy to clipboard operation
cloudflare-typescript-workers copied to clipboard

Types and mocks for building a tested Typescript Cloudflare Worker, generates three NPM packages

Results 7 cloudflare-typescript-workers issues
Sort by recently updated
recently updated
newest added

I'm trying to test code that does something like `crypto.subtle.digest('MD5', body)`. However, when I run the test, I get the error `ReferenceError: crypto is not defined`. Do the mocks need...

enhancement

Hey, folks! Given that Cloudflare seems to actively support typings for workers now: https://github.com/cloudflare/workers-types, do you have any plans on syncing/migrating to the "official" typings? Thanks for amazing work here...

help wanted

The `KV.list()` method signature according to the [docs](https://developers.cloudflare.com/workers/runtime-apis/kv#listing-keys) is: ```js NAMESPACE.list({prefix?: string, limit?: number, cursor?: string}) ``` This solution seems correct to resolve #27 but I'm not 100% about it....

bug

I have some test code that sets up a mock response like this: fetchMock.mockResponse('', { headers: { 'Content-Type': 'text/html' }, status: 404 }) However, I noticed that my tests that...

help wanted

https://github.com/udacity/cloudflare-typescript-workers/blob/57171c327149e48e85e1ad26cfe6fc4c485fa68f/packages/types-cloudflare-worker/src/global.ts#L668 The issue is with the list method signature (which is actually correct in the docblock above it). `NAMESPACE.list({prefix?: string, limit?: number, cursor?: string})` If I call the list method...

https://github.com/microsoft/TSJS-lib-generator/issues/729 has been resolved, which means #5 can be reverted, when the new typings are available upstream. Probably the next TS point release.

good first issue

It appears that cloudflare-worker-mock has a dependency on @udacity/types-service-worker-mock, which is not listed as a dependency in the package.json. Requiring the module in JS gives this error: ```sh Error: Cannot...

help wanted