UNPKG

ava

Version:

Node.js test runner that lets you develop with confidence.

14 lines (11 loc) 375 B
export default function validateEnvironmentVariables(environmentVariables) { if (!environmentVariables) { return {}; } for (const value of Object.values(environmentVariables)) { if (typeof value !== 'string') { throw new TypeError('The ’environmentVariables’ configuration must be an object containing string values.'); } } return environmentVariables; }