Commit b6b57a9b authored by Nick Stenning's avatar Nick Stenning

Add an empty file to be loaded for host tests

This fixes some distracting warnings in the test output.
parent 39df4a7e
...@@ -11,6 +11,7 @@ describe 'Host', -> ...@@ -11,6 +11,7 @@ describe 'Host', ->
fakeCrossFrame = null fakeCrossFrame = null
createHost = (options={}, element=null) -> createHost = (options={}, element=null) ->
options = Object.assign({app: '/base/test/empty.html'}, options)
if !element if !element
element = document.createElement('div') element = document.createElement('div')
return new Host(element, options) return new Host(element, options)
...@@ -86,9 +87,6 @@ describe 'Host', -> ...@@ -86,9 +87,6 @@ describe 'Host', ->
host.publish('panelReady') host.publish('panelReady')
it 'passes options to the sidebar iframe', -> it 'passes options to the sidebar iframe', ->
appURL = 'http://localhost:1000/app.html' appURL = new URL('/base/test/empty.html', window.location.href)
host = createHost({ host = createHost({annotations: '1234'})
app: appURL,
annotations: '1234'
})
assert.equal(host.frame[0].children[0].src, appURL + '?annotations=1234') assert.equal(host.frame[0].children[0].src, appURL + '?annotations=1234')
...@@ -23,6 +23,9 @@ module.exports = function(config) { ...@@ -23,6 +23,9 @@ module.exports = function(config) {
// Test setup // Test setup
'./test/bootstrap.js', './test/bootstrap.js',
// Empty HTML file to assist with some tests
{ pattern: './test/empty.html', watched: false },
// Karma watching is disabled for these files because they are // Karma watching is disabled for these files because they are
// bundled with karma-browserify which handles watching itself via // bundled with karma-browserify which handles watching itself via
// watchify // watchify
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment