Skip to content

Commit

Permalink
fix: await snapshot POST
Browse files Browse the repository at this point in the history
  • Loading branch information
Robdel12 committed Jan 15, 2020
1 parent b05df03 commit 38b64dc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions addon-test-support/@percy/ember/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,9 @@ export default async function percySnapshot(name, options = {}) {
}
}).domSnapshot(document, options);

// POST the snapshot in parallal by not awaiting
PercyFetch('http://localhost:5338/percy/snapshot', {
// Must be awaited on or you run the risk of doing asset discovery
// when the ember server has already shut down
await PercyFetch('http://localhost:5338/percy/snapshot', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
Expand Down

0 comments on commit 38b64dc

Please sign in to comment.