All files / src/lib build-environment.js

14.29% Statements 1/7
100% Branches 0/0
0% Functions 0/3
16.67% Lines 1/6
1 2 3 4 5 6 7 8 9 10 11 12 13  1x                      
import { Builder } from 'postman-sdk'
const { environment } = Builder
 
export default (collection, environments) =>
	environments.map(env => {
		const name = `${collection.info.name.toUpperCase()}_${env.name.toUpperCase()}`
		const newEnv = environment(name)
 
		env.values.map(variable => newEnv.add(variable))
 
		return newEnv
	})