Skip to content

Commit

Permalink
test(normalization): adapt for async normalization function
Browse files Browse the repository at this point in the history
  • Loading branch information
gr2m committed Feb 24, 2018
1 parent b0c1238 commit e91aad9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/integration/normalize-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ const normalize = require('../../lib/normalize')
glob.sync('scenarios/**/raw-fixture.json')
.map(path => path.replace(/(^scenarios\/|\/raw-fixture.json$)/g, ''))
.forEach(fixturnName => {
test(`normalize ${fixturnName}`, t => {
test(`normalize ${fixturnName}`, async t => {
const raw = require(`../../scenarios/${fixturnName}/raw-fixture.json`)
const expected = require(`../../scenarios/${fixturnName}/normalized-fixture.json`)

const scenarioState = {
commitSha: {},
ids: {}
}
const actual = raw.filter(isntIgnored).map(normalize.bind(null, scenarioState))
const actual = await Promise.all(raw.filter(isntIgnored).map(normalize.bind(null, scenarioState)))
t.deepEqual(actual, expected)
t.end()
})
Expand Down

0 comments on commit e91aad9

Please sign in to comment.