File
Blob: src/workerd/api/node/tests/process-nodejs-test.wd-test
| 1 | using Workerd = import "/workerd/workerd.capnp"; |
| 2 | |
| 3 | const unitTests :Workerd.Config = ( |
| 4 | services = [ |
| 5 | ( name = "nodejs-process-test", |
| 6 | worker = ( |
| 7 | modules = [ |
| 8 | (name = "worker", esModule = embed "process-nodejs-test.js"), |
| 9 | (name = "mod", esModule = "export const { FOO } = process.env;") |
| 10 | ], |
| 11 | compatibilityFlags = [ |
| 12 | "nodejs_compat", |
| 13 | "nodejs_compat_v2", |
| 14 | "enable_nodejs_process_v2", |
| 15 | "enable_nodejs_fs_module", |
| 16 | "nodejs_compat_populate_process_env" |
| 17 | ], |
| 18 | bindings = [ |
| 19 | (name = "FOO", text = "BAR"), |
| 20 | (name = "BAR", json = "{}"), |
| 21 | (name = "BAZ", json = "\"abc\""), |
| 22 | (name = "DUB", json = "\"\\\"abc\\\"\""), |
| 23 | (name = "NON", data = "abcdef") |
| 24 | ], |
| 25 | ) |
| 26 | ), |
| 27 | ], |
| 28 | ); |