Partial<NodeJS.ProcessEnv>undefinedCustom environment variables available on process.env during tests.
import { defineConfig } from '@rstest/core';
export default defineConfig({
env: {
PRINT_LOGGER: 'true',
},
});After setting the above configuration, you can access the PRINT_LOGGER variable in your tests:
import { describe, it } from '@rstest/core';
if (process.env.PRINT_LOGGER === 'true') {
console.log('PRINT_LOGGER is enabled');
}