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
fa6b17e7
Commit
fa6b17e7
authored
Mar 06, 2015
by
Randall Leeds
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1998 from hypothesis/move-frontend-tests
Move frontend tests alongside tested modules
parents
81774ae7
262d9e2a
Changes
36
Show whitespace changes
Inline
Side-by-side
Showing
36 changed files
with
63 additions
and
62 deletions
+63
-62
account-controller-test.coffee
h/static/scripts/account/test/account-controller-test.coffee
+1
-1
auth-controller-test.coffee
h/static/scripts/account/test/auth-controller-test.coffee
+1
-1
bucket-bar-test.coffee
...atic/scripts/annotator/plugin/test/bucket-bar-test.coffee
+1
-1
cross-frame-test.coffee
...tic/scripts/annotator/plugin/test/cross-frame-test.coffee
+1
-1
enhancedanchoring-test.coffee
...ripts/annotator/plugin/test/enhancedanchoring-test.coffee
+1
-1
texthighlight-test.coffee
...c/scripts/annotator/plugin/test/texthighlight-test.coffee
+1
-1
annotation-test.coffee
h/static/scripts/directives/test/annotation-test.coffee
+1
-1
privacy-test.coffee
h/static/scripts/directives/test/privacy-test.coffee
+1
-1
simple-search-test.coffee
h/static/scripts/directives/test/simple-search-test.coffee
+1
-1
status-button-test.coffee
h/static/scripts/directives/test/status-button-test.coffee
+1
-1
thread-test.coffee
h/static/scripts/directives/test/thread-test.coffee
+1
-1
form-helpers-test.coffee
h/static/scripts/helpers/test/form-helpers-test.coffee
+1
-1
string-helpers-test.coffee
h/static/scripts/helpers/test/string-helpers-test.coffee
+1
-1
time-helpers-test.coffee
h/static/scripts/helpers/test/time-helpers-test.coffee
+1
-1
session-service-test.coffee
h/static/scripts/session/test/session-service-test.coffee
+1
-1
annotation-mapper-service-test.coffee
h/static/scripts/test/annotation-mapper-service-test.coffee
+1
-1
annotation-sync-test.coffee
h/static/scripts/test/annotation-sync-test.coffee
+1
-1
annotation-ui-service-test.coffee
h/static/scripts/test/annotation-ui-service-test.coffee
+1
-1
annotation-ui-sync-test.coffee
h/static/scripts/test/annotation-ui-sync-test.coffee
+1
-1
auth-service-test.coffee
h/static/scripts/test/auth-service-test.coffee
+1
-1
bootstrap.coffee
h/static/scripts/test/bootstrap.coffee
+0
-0
bridge-test.coffee
h/static/scripts/test/bridge-test.coffee
+2
-2
controllers-test.coffee
h/static/scripts/test/controllers-test.coffee
+1
-1
cross-frame-service-test.coffee
h/static/scripts/test/cross-frame-service-test.coffee
+1
-1
directives-test.coffee
h/static/scripts/test/directives-test.coffee
+1
-1
discovery-test.coffee
h/static/scripts/test/discovery-test.coffee
+1
-1
filters-test.coffee
h/static/scripts/test/filters-test.coffee
+1
-1
guest-test.coffee
h/static/scripts/test/guest-test.coffee
+1
-1
host-test.coffee
h/static/scripts/test/host-test.coffee
+1
-1
identity-service-test.coffee
h/static/scripts/test/identity-service-test.coffee
+1
-1
permissions-service-test.coffee
h/static/scripts/test/permissions-service-test.coffee
+1
-1
services-test.coffee
h/static/scripts/test/services-test.coffee
+1
-1
store-service-test.coffee
h/static/scripts/test/store-service-test.coffee
+1
-1
streamer-service-test.coffee
h/static/scripts/test/streamer-service-test.coffee
+1
-1
threading-service-test.coffee
h/static/scripts/test/threading-service-test.coffee
+1
-1
karma.config.js
karma.config.js
+28
-27
No files found.
tests/js/accoun
t/account-controller-test.coffee
→
h/static/scripts/account/tes
t/account-controller-test.coffee
View file @
fa6b17e7
...
...
@@ -19,7 +19,7 @@ describe 'h:AccountController', ->
before
->
angular
.
module
(
'h'
,
[])
require
(
'../
../../h/static/scripts/account/
account-controller'
)
require
(
'../account-controller'
)
beforeEach
module
(
'h'
)
...
...
tests/js/accoun
t/auth-controller-test.coffee
→
h/static/scripts/account/tes
t/auth-controller-test.coffee
View file @
fa6b17e7
...
...
@@ -29,7 +29,7 @@ describe 'h:AuthController', ->
before
->
angular
.
module
(
'h'
,
[])
require
(
'../
../../h/static/scripts/account/
auth-controller'
)
require
(
'../auth-controller'
)
beforeEach
module
(
'h'
)
beforeEach
module
(
'h.templates'
)
...
...
tests/js/annotator/plugins
/bucket-bar-test.coffee
→
h/static/scripts/annotator/plugin/test
/bucket-bar-test.coffee
View file @
fa6b17e7
bb
=
require
(
'../
../../../h/static/scripts/annotator/plugin/
bucket-bar'
)
bb
=
require
(
'../bucket-bar'
)
assert
=
chai
.
assert
sinon
.
assert
.
expose
(
assert
,
prefix
:
''
)
...
...
tests/js/annotator/plugins
/cross-frame-test.coffee
→
h/static/scripts/annotator/plugin/test
/cross-frame-test.coffee
View file @
fa6b17e7
cf
=
require
(
'../
../../../h/static/scripts/annotator/plugin/
cross-frame'
)
cf
=
require
(
'../cross-frame'
)
assert
=
chai
.
assert
sinon
.
assert
.
expose
(
assert
,
prefix
:
''
)
...
...
tests/js/plugin
/enhancedanchoring-test.coffee
→
h/static/scripts/annotator/plugin/test
/enhancedanchoring-test.coffee
View file @
fa6b17e7
Annotator
=
require
(
'annotator'
)
ea
=
require
(
'../
../../h/static/scripts/annotator/plugin/
enhancedanchoring'
)
ea
=
require
(
'../enhancedanchoring'
)
assert
=
chai
.
assert
sinon
.
assert
.
expose
(
assert
,
prefix
:
''
)
...
...
tests/js/plugin
/texthighlight-test.coffee
→
h/static/scripts/annotator/plugin/test
/texthighlight-test.coffee
View file @
fa6b17e7
Annotator
=
require
(
'annotator'
)
th
=
require
(
'../
../../h/static/scripts/annotator/plugin/
texthighlights'
)
th
=
require
(
'../texthighlights'
)
assert
=
chai
.
assert
sinon
.
assert
.
expose
(
assert
,
prefix
:
''
)
...
...
tests/js/directives
/annotation-test.coffee
→
h/static/scripts/directives/test
/annotation-test.coffee
View file @
fa6b17e7
...
...
@@ -25,7 +25,7 @@ describe 'h.directives.annotation', ->
before
->
angular
.
module
(
'h'
,
[])
require
(
'../
../../h/static/scripts/directives/
annotation'
)
require
(
'../annotation'
)
beforeEach
module
(
'h'
)
beforeEach
module
(
'h.templates'
)
...
...
tests/js/directives
/privacy-test.coffee
→
h/static/scripts/directives/test
/privacy-test.coffee
View file @
fa6b17e7
...
...
@@ -16,7 +16,7 @@ describe 'h.directives.privacy', ->
before
->
angular
.
module
(
'h'
,
[])
require
(
'../
../../h/static/scripts/directives/
privacy'
)
require
(
'../privacy'
)
beforeEach
module
(
'h'
)
beforeEach
module
(
'h.templates'
)
...
...
tests/js/directives
/simple-search-test.coffee
→
h/static/scripts/directives/test
/simple-search-test.coffee
View file @
fa6b17e7
...
...
@@ -12,7 +12,7 @@ describe 'h:directives.simple-search', ->
before
->
angular
.
module
(
'h'
,
[])
require
(
'../
../../h/static/scripts/directives/
simple-search'
)
require
(
'../simple-search'
)
beforeEach
module
(
'h'
)
...
...
tests/js/directives
/status-button-test.coffee
→
h/static/scripts/directives/test
/status-button-test.coffee
View file @
fa6b17e7
...
...
@@ -10,7 +10,7 @@ describe 'h:directives.status-button', ->
before
->
angular
.
module
(
'h'
,
[])
require
(
'../
../../h/static/scripts/directives/
status-button'
)
require
(
'../status-button'
)
beforeEach
module
(
'h'
)
...
...
tests/js/directives
/thread-test.coffee
→
h/static/scripts/directives/test
/thread-test.coffee
View file @
fa6b17e7
...
...
@@ -10,7 +10,7 @@ describe 'h:directives.thread', ->
before
->
angular
.
module
(
'h'
,
[])
require
(
'../
../../h/static/scripts/directives/
thread'
)
require
(
'../thread'
)
beforeEach
module
(
'h'
)
...
...
tests/js/helpers
/form-helpers-test.coffee
→
h/static/scripts/helpers/test
/form-helpers-test.coffee
View file @
fa6b17e7
...
...
@@ -12,7 +12,7 @@ describe 'h.helpers:form-helpers', ->
before
->
angular
.
module
(
'h.helpers'
,
[])
require
(
'../
../../h/static/scripts/helpers/
form-helpers'
)
require
(
'../form-helpers'
)
beforeEach
module
(
'h.helpers'
)
...
...
tests/js/helpers
/string-helpers-test.coffee
→
h/static/scripts/helpers/test
/string-helpers-test.coffee
View file @
fa6b17e7
...
...
@@ -9,7 +9,7 @@ describe 'h.helpers:string-helpers', ->
before
->
angular
.
module
(
'h.helpers'
,
[])
require
(
'../
../../h/static/scripts/helpers/
string-helpers'
)
require
(
'../string-helpers'
)
beforeEach
module
(
'h.helpers'
)
...
...
tests/js/helpers
/time-helpers-test.coffee
→
h/static/scripts/helpers/test
/time-helpers-test.coffee
View file @
fa6b17e7
...
...
@@ -44,7 +44,7 @@ describe 'h.helpers:time-helpers', ->
before
->
angular
.
module
(
'h.helpers'
,
[])
require
(
'../
../../h/static/scripts/helpers/
time-helpers'
)
require
(
'../time-helpers'
)
beforeEach
module
(
'h.helpers'
)
...
...
tests/js
/session-service-test.coffee
→
h/static/scripts/session/test
/session-service-test.coffee
View file @
fa6b17e7
...
...
@@ -12,7 +12,7 @@ describe 'h.session', ->
before
->
angular
.
module
(
'h.session'
,
[
'ngResource'
])
require
(
'../
../h/static/scripts/session/
session-service'
)
require
(
'../session-service'
)
beforeEach
module
(
'h.session'
)
...
...
tests/js
/annotation-mapper-service-test.coffee
→
h/static/scripts/test
/annotation-mapper-service-test.coffee
View file @
fa6b17e7
...
...
@@ -14,7 +14,7 @@ describe 'AnnotationMapperService', ->
before
->
angular
.
module
(
'h'
,
[])
require
(
'../
../h/static/scripts/
annotation-mapper-service'
)
require
(
'../annotation-mapper-service'
)
beforeEach
module
(
'h'
)
beforeEach
module
(
$provide
)
->
...
...
tests/js
/annotation-sync-test.coffee
→
h/static/scripts/test
/annotation-sync-test.coffee
View file @
fa6b17e7
...
...
@@ -15,7 +15,7 @@ describe 'AnnotationSync', ->
before
->
angular
.
module
(
'h'
,
[])
require
(
'../
../h/static/scripts/
annotation-sync'
)
require
(
'../annotation-sync'
)
beforeEach
module
(
'h'
)
beforeEach
inject
(
AnnotationSync
,
$rootScope
)
->
...
...
tests/js
/annotation-ui-service-test.coffee
→
h/static/scripts/test
/annotation-ui-service-test.coffee
View file @
fa6b17e7
...
...
@@ -9,7 +9,7 @@ describe 'AnnotationUI', ->
before
->
angular
.
module
(
'h'
,
[])
require
(
'../
../h/static/scripts/
annotation-ui-service'
)
require
(
'../annotation-ui-service'
)
beforeEach
module
(
'h'
)
beforeEach
inject
(
_annotationUI_
)
->
...
...
tests/js
/annotation-ui-sync-test.coffee
→
h/static/scripts/test
/annotation-ui-sync-test.coffee
View file @
fa6b17e7
...
...
@@ -18,7 +18,7 @@ describe 'AnnotationUISync', ->
before
->
angular
.
module
(
'h'
,
[])
require
(
'../
../h/static/scripts/
annotation-ui-sync'
)
require
(
'../annotation-ui-sync'
)
beforeEach
module
(
'h'
)
beforeEach
inject
(
AnnotationUISync
,
$rootScope
)
->
...
...
tests/js
/auth-service-test.coffee
→
h/static/scripts/test
/auth-service-test.coffee
View file @
fa6b17e7
...
...
@@ -11,7 +11,7 @@ describe 'h', ->
before
->
angular
.
module
(
'h'
,
[])
require
(
'../
../h/static/scripts/
auth-service'
)
require
(
'../auth-service'
)
beforeEach
module
(
'h'
)
...
...
tests/js
/bootstrap.coffee
→
h/static/scripts/test
/bootstrap.coffee
View file @
fa6b17e7
File moved
tests/js
/bridge-test.coffee
→
h/static/scripts/test
/bridge-test.coffee
View file @
fa6b17e7
{
module
,
inject
}
=
require
(
'angular-mock'
)
Channel
=
require
(
'../
../h/static/scripts/
vendor/jschannel.js'
)
Channel
=
require
(
'../vendor/jschannel.js'
)
assert
=
chai
.
assert
sinon
.
assert
.
expose
assert
,
prefix
:
null
...
...
@@ -12,7 +12,7 @@ describe 'Bridge', ->
before
->
angular
.
module
(
'h'
,
[])
require
(
'../
../h/static/scripts/
bridge'
)
require
(
'../bridge'
)
beforeEach
module
(
'h'
)
beforeEach
inject
(
Bridge
)
->
...
...
tests/js
/controllers-test.coffee
→
h/static/scripts/test
/controllers-test.coffee
View file @
fa6b17e7
...
...
@@ -7,7 +7,7 @@ sinon.assert.expose assert, prefix: null
describe
'h:controllers'
,
->
before
->
angular
.
module
(
'h'
,
[
'ngRoute'
])
require
(
'../
../h/static/scripts/
controllers'
)
require
(
'../controllers'
)
describe
'AppController'
,
->
$scope
=
null
...
...
tests/js
/cross-frame-service-test.coffee
→
h/static/scripts/test
/cross-frame-service-test.coffee
View file @
fa6b17e7
...
...
@@ -19,7 +19,7 @@ describe 'CrossFrameService', ->
before
->
angular
.
module
(
'h'
,
[])
require
(
'../
../h/static/scripts/
cross-frame-service'
)
require
(
'../cross-frame-service'
)
beforeEach
module
(
'h'
)
beforeEach
module
(
$provide
)
->
...
...
tests/js
/directives-test.coffee
→
h/static/scripts/test
/directives-test.coffee
View file @
fa6b17e7
...
...
@@ -6,7 +6,7 @@ assert = chai.assert
describe
'h:directives'
,
->
before
->
angular
.
module
(
'h'
,
[])
require
(
'../
../h/static/scripts/
directives'
)
require
(
'../directives'
)
beforeEach
module
(
'h'
)
...
...
tests/js
/discovery-test.coffee
→
h/static/scripts/test
/discovery-test.coffee
View file @
fa6b17e7
...
...
@@ -12,7 +12,7 @@ describe 'Discovery', ->
before
->
angular
.
module
(
'h'
,
[])
require
(
'../
../h/static/scripts/
discovery'
)
require
(
'../discovery'
)
beforeEach
module
(
'h'
)
beforeEach
inject
(
Discovery
)
->
...
...
tests/js
/filters-test.coffee
→
h/static/scripts/test
/filters-test.coffee
View file @
fa6b17e7
...
...
@@ -7,7 +7,7 @@ describe 'h:filters', ->
before
->
angular
.
module
(
'h'
,
[])
require
(
'../
../h/static/scripts/
filters'
)
require
(
'../filters'
)
describe
'persona'
,
->
filter
=
null
...
...
tests/js
/guest-test.coffee
→
h/static/scripts/test
/guest-test.coffee
View file @
fa6b17e7
Annotator
=
require
(
'annotator'
)
Guest
=
require
(
'../
../h/static/scripts/
guest'
)
Guest
=
require
(
'../guest'
)
assert
=
chai
.
assert
sinon
.
assert
.
expose
(
assert
,
prefix
:
''
)
...
...
tests/js
/host-test.coffee
→
h/static/scripts/test
/host-test.coffee
View file @
fa6b17e7
Annotator
=
require
(
'annotator'
)
Host
=
require
(
'../
../h/static/scripts/
host'
)
Host
=
require
(
'../host'
)
assert
=
chai
.
assert
sinon
.
assert
.
expose
(
assert
,
prefix
:
''
)
...
...
tests/js
/identity-service-test.coffee
→
h/static/scripts/test
/identity-service-test.coffee
View file @
fa6b17e7
...
...
@@ -10,7 +10,7 @@ describe 'h.identity', ->
mockInjectable
=
{}
before
->
require
(
'../
../h/static/scripts/
identity-service'
)
require
(
'../identity-service'
)
beforeEach
module
(
'h.identity'
)
...
...
tests/js
/permissions-service-test.coffee
→
h/static/scripts/test
/permissions-service-test.coffee
View file @
fa6b17e7
...
...
@@ -10,7 +10,7 @@ describe 'h:permissions', ->
before
->
angular
.
module
(
'h'
,
[])
require
(
'../
../h/static/scripts/
permissions-service'
)
require
(
'../permissions-service'
)
beforeEach
module
(
'h'
)
...
...
tests/js
/services-test.coffee
→
h/static/scripts/test
/services-test.coffee
View file @
fa6b17e7
...
...
@@ -22,7 +22,7 @@ describe 'h:services', ->
before
->
angular
.
module
(
'h'
,
[])
require
(
'../
../h/static/scripts/
services'
)
require
(
'../services'
)
beforeEach
module
(
'h'
)
...
...
tests/js
/store-service-test.coffee
→
h/static/scripts/test
/store-service-test.coffee
View file @
fa6b17e7
...
...
@@ -12,7 +12,7 @@ describe 'store', ->
before
->
angular
.
module
(
'h'
,
[
'ngResource'
])
require
(
'../
../h/static/scripts/
store-service'
)
require
(
'../store-service'
)
beforeEach
module
(
'h'
)
...
...
tests/js
/streamer-service-test.coffee
→
h/static/scripts/test
/streamer-service-test.coffee
View file @
fa6b17e7
...
...
@@ -12,7 +12,7 @@ describe 'streamer', ->
sandbox
=
null
before
->
require
(
'../
../h/static/scripts/
streamer-service'
)
require
(
'../streamer-service'
)
beforeEach
module
(
'h.streamer'
)
...
...
tests/js
/threading-service-test.coffee
→
h/static/scripts/test
/threading-service-test.coffee
View file @
fa6b17e7
...
...
@@ -9,7 +9,7 @@ describe 'Threading', ->
before
->
angular
.
module
(
'h'
,
[])
require
(
'../
../h/static/scripts/
threading-service'
)
require
(
'../threading-service'
)
beforeEach
module
(
'h'
)
...
...
karma.config.js
View file @
fa6b17e7
// Karma configuration
// Generated on Mon Jul 14 2014 14:06:50 GMT+0200 (CEST)
var
path
=
require
(
'path'
);
module
.
exports
=
function
(
config
)
{
config
.
set
({
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath
:
''
,
basePath
:
'
h/static/scripts
'
,
// frameworks to use
...
...
@@ -19,34 +20,34 @@ module.exports = function(config) {
// list of files / patterns to load in the browser
files
:
[
// Application external deps
'
h/static/scripts/
vendor/jquery.js'
,
'
h/static/scripts/
vendor/angular.js'
,
'
h/static/scripts/
vendor/angular-animate.js'
,
'
h/static/scripts/
vendor/angular-bootstrap.js'
,
'
h/static/scripts/
vendor/angular-resource.js'
,
'
h/static/scripts/
vendor/angular-route.js'
,
'
h/static/scripts/
vendor/angular-sanitize.js'
,
'
h/static/scripts/
vendor/ng-tags-input.js'
,
'
h/static/scripts/
vendor/annotator.js'
,
'
h/static/scripts/
vendor/polyfills/autofill-event.js'
,
'
h/static/scripts/
vendor/polyfills/bind.js'
,
'
h/static/scripts/
vendor/katex/katex.js'
,
'
h/static/scripts/
vendor/moment-with-langs.js'
,
'
h/static/scripts/
vendor/jstz.js'
,
'
h/static/scripts/
vendor/moment-timezone.js'
,
'
h/static/scripts/
vendor/moment-timezone-data.js'
,
'
h/static/scripts/
vendor/polyfills/url.js'
,
'vendor/jquery.js'
,
'vendor/angular.js'
,
'vendor/angular-animate.js'
,
'vendor/angular-bootstrap.js'
,
'vendor/angular-resource.js'
,
'vendor/angular-route.js'
,
'vendor/angular-sanitize.js'
,
'vendor/ng-tags-input.js'
,
'vendor/annotator.js'
,
'vendor/polyfills/autofill-event.js'
,
'vendor/polyfills/bind.js'
,
'vendor/katex/katex.js'
,
'vendor/moment-with-langs.js'
,
'vendor/jstz.js'
,
'vendor/moment-timezone.js'
,
'vendor/moment-timezone-data.js'
,
'vendor/polyfills/url.js'
,
// Test deps
'
h/static/scripts/
vendor/angular-mocks.js'
,
'
h/static/scripts/
vendor/polyfills/promise.js'
,
'
h/static/scripts/
vendor/sinon.js'
,
'
h/static/scripts/
vendor/chai.js'
,
'
h
/templates/client/*.html'
,
'test
s/js
/bootstrap.coffee'
,
'vendor/angular-mocks.js'
,
'vendor/polyfills/promise.js'
,
'vendor/sinon.js'
,
'vendor/chai.js'
,
'
../..
/templates/client/*.html'
,
'test/bootstrap.coffee'
,
// Tests
'
tests/js/**/*-test.coffee'
,
'
**/*-test.coffee'
],
...
...
@@ -57,14 +58,14 @@ module.exports = function(config) {
// strip templates of leading path
ngHtml2JsPreprocessor
:
{
moduleName
:
'h.templates'
,
stripPrefix
:
'h/templates/client/'
cacheIdFromPath
:
path
.
basename
},
// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
preprocessors
:
{
'**/*.coffee'
:
[
'browserify'
],
'
h
/templates/client/*.html'
:
[
'ng-html2js'
],
'
../..
/templates/client/*.html'
:
[
'ng-html2js'
],
},
browserify
:
{
...
...
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