Skip to content

Commit

Permalink
test(boot): set the progress to null at the start
Browse files Browse the repository at this point in the history
Increasing test coverage
  • Loading branch information
dtinth committed Feb 11, 2015
1 parent 3df8fda commit 1454675
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/boot/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,16 @@ let mode = data.mode || 'comingSoon'
/* istanbul ignore else - we can check that by functional tests */
if (loadModule[mode]) {
let context = new LoadingContext()
boot.setProgress(null)
context.onprogress = function(loaded, total) {
boot.setProgress(loaded / total)
}
context.use(function() {
loadModule[mode](function(loadedModule) {
boot.hide()
loadedModule.main()
})
})
context.onprogress = function(loaded, total) {
boot.setProgress(loaded / total)
}
} else {
console.error('Invalid mode:', mode)
}
Expand Down

0 comments on commit 1454675

Please sign in to comment.