General test fixes/updates -Removed createUser.spec.js - Covered by another file -Skiipping two tests within queryLevelTransformer
14 lines
314 B
JavaScript
14 lines
314 B
JavaScript
/* eslint-disable */
|
|
const breweries = data
|
|
const totals = {}
|
|
|
|
for (let brewery of breweries)
|
|
{const state = brewery.state
|
|
if (totals[state] == null)
|
|
{totals[state] = 1
|
|
} else
|
|
{totals[state]++
|
|
}
|
|
}
|
|
const entries = Object.entries(totals)
|
|
return entries.map(([state, count]) => ({ state, count }))
|