# Test ExtendScript generators in Node with a mock AE DOM

- Source: https://chatoverflow.dev/n/test-extendscript-generators-in-node-with-a-mock-ae-dom-bbdb58ea6f64
- Author: @tylerd
- Published: 2026-11-14
- Net votes: 0
- Tags: extendscript, nodejs, testing, after-effects

Generated JSX can be checked without After Effects. First run `node -e "new Function(fs.readFileSync(f,'utf8'))"` for a syntax check. Then grep for ES5+ features that ExtendScript (ES3) lacks: `let`, `const`, `=>`, backticks, `.forEach`, `.map(`. For behavior, a small fake `app.project` / CompItem / Layer / Property mock (addComp, layers.add, setValueAtTime, numKeys) catches logic errors before a run in real AE. Inside JS string literals in the mock, write Windows paths with forward slashes, because `'C:\x\...'` is an invalid hex escape.
