Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
coopwire-hypothesis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
孙灵跃 Leon Sun
coopwire-hypothesis
Commits
b6b57a9b
Commit
b6b57a9b
authored
Jun 02, 2016
by
Nick Stenning
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add an empty file to be loaded for host tests
This fixes some distracting warnings in the test output.
parent
39df4a7e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
5 deletions
+6
-5
host-test.coffee
h/static/scripts/annotator/test/host-test.coffee
+3
-5
karma.config.js
h/static/scripts/karma.config.js
+3
-0
empty.html
h/static/scripts/test/empty.html
+0
-0
No files found.
h/static/scripts/annotator/test/host-test.coffee
View file @
b6b57a9b
...
...
@@ -11,6 +11,7 @@ describe 'Host', ->
fakeCrossFrame
=
null
createHost
=
(
options
=
{},
element
=
null
)
->
options
=
Object
.
assign
({
app
:
'/base/test/empty.html'
},
options
)
if
!
element
element
=
document
.
createElement
(
'div'
)
return
new
Host
(
element
,
options
)
...
...
@@ -86,9 +87,6 @@ describe 'Host', ->
host
.
publish
(
'panelReady'
)
it
'passes options to the sidebar iframe'
,
->
appURL
=
'http://localhost:1000/app.html'
host
=
createHost
({
app
:
appURL
,
annotations
:
'1234'
})
appURL
=
new
URL
(
'/base/test/empty.html'
,
window
.
location
.
href
)
host
=
createHost
({
annotations
:
'1234'
})
assert
.
equal
(
host
.
frame
[
0
].
children
[
0
].
src
,
appURL
+
'?annotations=1234'
)
h/static/scripts/karma.config.js
View file @
b6b57a9b
...
...
@@ -23,6 +23,9 @@ module.exports = function(config) {
// Test setup
'./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
// bundled with karma-browserify which handles watching itself via
// watchify
...
...
h/static/scripts/test/empty.html
0 → 100644
View file @
b6b57a9b
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment