Skip to content

Commit

Permalink
startWorker tests (#6124)
Browse files Browse the repository at this point in the history
* test: improve Windows reliability of e2e tests

- `child_process.kill()` doesn't really work on Windows. Using `kill-tree` library instead
- `killAllWranglerDev()` helper could mess up parallel tests since it kills all wrangler/workerd processes regardless of whether they are part of the current test
- `shellac` library has issues on Windows when running background tasks. Using simple `execSync` and `spawn` functions instead
- tightened up the timeouts a bit to avoid long running false negatives
- reworked the helpers to use a class `WranglerE2ETestHelper` rather than the `e2eTest` extension.

* unskip

* expose url+inspectorUrl properties

* test startWorker
by rewriting dev-env fixture tests as e2e tests without fakes

* set e2e/tsconfig `module` to 'esnext'

* delete fixtures/dev-env

* add changeset

* rename test file

* remove deepmerge from config controller

* fix e2e jsx lints

* fix lints

* fix lints

---------

Co-authored-by: Pete Bacon Darwin <pete@bacondarwin.com>
Co-authored-by: Peter Bacon Darwin <pbacondarwin@cloudflare.com>
  • Loading branch information
3 people committed Jun 27, 2024
1 parent 92d25e7 commit d03b102
Show file tree
Hide file tree
Showing 15 changed files with 595 additions and 754 deletions.
5 changes: 5 additions & 0 deletions .changeset/little-dolphins-breathe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"wrangler": patch
---

feat: `url` and `inspectorUrl` properties have been exposed on the worker object returned by `new unstable_DevEnv().startWorker(options)`
1 change: 0 additions & 1 deletion fixtures/dev-env/.gitignore

This file was deleted.

27 changes: 0 additions & 27 deletions fixtures/dev-env/package.json

This file was deleted.

Loading

0 comments on commit d03b102

Please sign in to comment.