You can't do this, because const. let and var declarations are scoped to the block where they are declared, and cannot be accessed from outer scope. Also, it's an antipattern to make tests depend on previous tests; ideally, you shouldn't rely of tests execution order at all. If you need to share a value between test, you can use hooks and test context, e.g.: