Skip to content

Commit

Permalink
Add more logging to a test failing only in Travis / Node 4
Browse files Browse the repository at this point in the history
  • Loading branch information
insin committed Dec 12, 2017
1 parent 4c2121c commit b2a663f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/commands/projects-test.js
Expand Up @@ -103,12 +103,13 @@ describe('sample projects', function() {

// Change a file to trigger a reload after the HMR client connects
hmrClient.onopen = () => {
console.log('HMR open: changing file in 5s')
console.log('HMR open: changing file in 10s')
setTimeout(() => {
state = States.CHANGED_FILE
let content = fs.readFileSync(path.join(tmpDir, 'src/App.js'), 'utf-8')
console.log('HMR open: changing file now')
fs.writeFileSync(path.join(tmpDir, 'src/App.js'), content.replace('Welcome to', 'Change'))
}, 5000)
}, 10000)
}

// Fail on EventSource errors
Expand All @@ -117,6 +118,7 @@ describe('sample projects', function() {
}

hmrClient.onmessage = e => {
// Ignore hearbeat
if (e.data === '\uD83D\uDC93') {
return
}
Expand Down

0 comments on commit b2a663f

Please sign in to comment.