cloudflare / cloudflare/speedtest

Feature Request: Add support for Deno

Open
#32 2 comments 2 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
738
Forks
83
Avg merge
1d 12h
Merged PRs (30d)
6

Description

Sample code:

```typescript
import { default as CFSpeedTest, ConfigOptions } from "npm:@cloudflare/speedtest@1.3.0"

async function main() {
const opts: ConfigOptions = {
}
const test = new CFSpeedTest(opts)
test.onFinish = (results) => {
console.log(results)
}
}

if (import.meta.main) {
await main()
}
```

Output:

```
✅ Granted read access to "C:\Users\codyc\AppData\Local\deno\npm\node_modules".
✅ Granted read access to "C:\Users\codyc\AppData\Local\deno\node_modules".
✅ Granted read access to "C:\Users\codyc\AppData\Local\node_modules".
✅ Granted read access to "C:\Users\codyc\AppData\node_modules".
✅ Granted read access to "C:\Users\codyc\node_modules".
✅ Granted read access to "C:\Users\node_modules".
✅ Granted read access to "C:\node_modules".
Error fetching https://speed.cloudflare.com/__down?bytes=0: TypeError: Cannot read properties of undefined (reading 'transferSize')
Error fetching https://speed.cloudflare.com/__down?bytes=0: TypeError: Cannot read properties of undefined (reading 'transferSize')
Error fetching https://speed.cloudflare.com/__down?bytes=0: TypeError: Cannot read properties of undefined (reading 'transferSize')
Error fetching https://speed.cloudflare.com/__down?bytes=0: TypeError: Cannot read properties of undefined (reading 'transferSize')
Error fetching https://speed.cloudflare.com/__down?bytes=0: TypeError: Cannot read properties of undefined (reading 'transferSize')
Error fetching https://speed.cloudflare.com/__down?bytes=0: TypeError: Cannot read properties of undefined (reading 'transferSize')
Error fetching https://speed.cloudflare.com/__down?bytes=0: TypeError: Cannot read properties of undefined (reading 'transferSize')
Error fetching https://speed.cloudflare.com/__down?bytes=0: TypeError: Cannot read properties of undefined (reading 'transferSize')
Error fetching https://speed.cloudflare.com/__down?bytes=0: TypeError: Cannot read properties of undefined (reading 'transferSize')
Error fetching https://speed.cloudflare.com/__down?bytes=0: TypeError: Cannot read properties of undefined (reading 'transferSize')
Error fetching https://speed.cloudflare.com/__down?bytes=0: TypeError: Cannot read properties of undefined (reading 'transferSize')
Error fetching https://speed.cloudflare.com/__down?bytes=0: TypeError: Cannot read properties of undefined (reading 'transferSize')
Error fetching https://speed.cloudflare.com/__down?bytes=0: TypeError: Cannot read properties of undefined (reading 'transferSize')
Error fetching https://speed.cloudflare.com/__down?bytes=0: TypeError: Cannot read properties of undefined (reading 'transferSize')
Error fetching https://speed.cloudflare.com/__down?bytes=0: TypeError: Cannot read properties of undefined (reading 'transferSize')
Error fetching https://speed.cloudflare.com/__down?bytes=0: TypeError: Cannot read properties of undefined (reading 'transferSize')
Error fetching https://speed.cloudflare.com/__down?bytes=0: TypeError: Cannot read properties of undefined (reading 'transferSize')
Error fetching https://speed.cloudflare.com/__down?bytes=0: TypeError: Cannot read properties of undefined (reading 'transferSize')
Error fetching https://speed.cloudflare.com/__down?bytes=0: TypeError: Cannot read properties of undefined (reading 'transferSize')
Error fetching https://speed.cloudflare.com/__down?bytes=0: TypeError: Cannot read properties of undefined (reading 'transferSize')
Error fetching https://speed.cloudflare.com/__down?bytes=0: TypeError: Cannot read properties of undefined (reading 'transferSize')
Error fetching https://speed.cloudflare.com/__down?bytes=100000: TypeError: Cannot read properties of undefined (reading 'transferSize')
Error fetching https://speed.cloudflare.com/__down?bytes=100000: TypeError: Cannot read properties of undefined (reading 'transferSize')
Error fetching https://speed.cloudflare.com/__down?during=download&bytes=0: TypeError: Cannot read properties of undefined (reading 'transferSize')
Error fetching https://speed.cloudflare.com/__down?bytes=100000: TypeError: Cannot read properties of undefined (reading 'transferSize')
Error fetching https://speed.cloudflare.com/__down?bytes=100000: TypeError: Cannot read properties of undefined (reading 'transferSize')
Error fetching https://speed.cloudflare.com/__down?during=download&bytes=0: TypeError: Cannot read properties of undefined (reading 'transferSize')
[etc.]
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.