Skip to content

Commit 6b90716

Browse files
committed
Enable additional Node.js modules in test configs
Added compatibility flags for tty, fs, http, and perf_hooks Node.js modules in wrangler.jsonc test configurations for partyserver, partysub, and partywhen packages to support broader Node.js API usage during testing.
1 parent 19b9eda commit 6b90716

3 files changed

Lines changed: 24 additions & 3 deletions

File tree

packages/partyserver/src/tests/wrangler.jsonc

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
{
22
"main": "/worker.ts",
33
"compatibility_date": "2024-05-12",
4-
"compatibility_flags": ["nodejs_compat"],
4+
"compatibility_flags": [
5+
"nodejs_compat",
6+
// test specific flags
7+
"enable_nodejs_tty_module",
8+
"enable_nodejs_fs_module",
9+
"enable_nodejs_http_modules",
10+
"enable_nodejs_perf_hooks_module"
11+
],
512
"durable_objects": {
613
"bindings": [
714
{

packages/partysub/src/server/tests/wrangler.jsonc

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,12 @@
22
"name": "partysub-tests",
33
"main": "./worker.ts",
44
"compatibility_date": "2024-07-25",
5-
"compatibility_flags": ["nodejs_compat"]
5+
"compatibility_flags": [
6+
"nodejs_compat",
7+
// test specific flags
8+
"enable_nodejs_tty_module",
9+
"enable_nodejs_fs_module",
10+
"enable_nodejs_http_modules",
11+
"enable_nodejs_perf_hooks_module"
12+
]
613
}

packages/partywhen/tests/wrangler.jsonc

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,14 @@
22
"name": "durable-scheduler-tests",
33
"compatibility_date": "2024-11-06",
44
"main": "./index.ts",
5-
"compatibility_flags": ["nodejs_compat"],
5+
"compatibility_flags": [
6+
"nodejs_compat",
7+
// test specific flags
8+
"enable_nodejs_tty_module",
9+
"enable_nodejs_fs_module",
10+
"enable_nodejs_http_modules",
11+
"enable_nodejs_perf_hooks_module"
12+
],
613
"durable_objects": {
714
"bindings": [
815
{

0 commit comments

Comments
 (0)