-
Notifications
You must be signed in to change notification settings - Fork 723
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
The code had been converted to typescript in 026d944, but packages.json and several other places still refered to .js files. In addition a refactoring of the test code meant tests for both /up and /down urls were now being sent to the handler for /up, causing the tests to fail. I removed some of the test in up.test.ts since they were testing different values of the ?bytes= parameter, but this parameter is only used in down.ts, not in up.ts. Co-authored-by: Sunil Pai <spai@cloudflare.com>
- Loading branch information
1 parent
d4eb5c5
commit 062e414
Showing
9 changed files
with
23 additions
and
35 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
import worker from '../src/up'; | ||
import worker from '../src/index'; | ||
|
||
type methods = 'GET' | 'POST'; | ||
type directions = 'up' | 'down'; | ||
|
||
export async function run(method?: methods, num?: number) { | ||
let url = 'https://example.com'; | ||
export async function run(direction: directions, method?: methods, num?: number) { | ||
let url = `https://example.com/${direction}`; | ||
if (num != null) url += '?bytes=' + num; | ||
let req = new Request(url, { method }); | ||
return worker(req); | ||
return worker.fetch(req); | ||
} |
This file contains 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