Skip to content

Commit

Permalink
Refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed Jan 16, 2022
1 parent 65836a7 commit fbb492a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/combination/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const getCombinationsProduct = function (tasks, inputsList, system) {
throw new UserError(`Please specify some "tasks".`)
}

const systemDimensions = mapObj(system, getSystemDimension)
const systemDimensions = getSystemDimensions(system)
return tasks.map(({ id, taskPath, runner: { versions, ...runner } }) => ({
dimensions: { task: { id }, runner, ...systemDimensions },
taskPath,
Expand All @@ -44,6 +44,10 @@ const getCombinationsProduct = function (tasks, inputsList, system) {
}))
}

const getSystemDimensions = function (system) {
return mapObj(system, getSystemDimension)
}

const getSystemDimension = function (propName, id) {
return [addPrefix(propName, 'system'), { id }]
}

0 comments on commit fbb492a

Please sign in to comment.