File tree 3 files changed +24
-11
lines changed
3 files changed +24
-11
lines changed Original file line number Diff line number Diff line change 1
1
module . exports = function ( grunt ) {
2
2
grunt . initConfig ( {
3
3
connect : {
4
+ options : {
5
+ //useAvailablePort: true,
6
+ port : 8000 ,
7
+ hostname : '*' ,
8
+ base : '.' ,
9
+ //keepalive: true,
10
+ livereload : true
11
+ //debug: true,
12
+ } ,
4
13
server : {
5
14
options : {
6
- //useAvailablePort: true,
7
- port : 8000 ,
8
- hostname : '*' ,
9
- base : '.' ,
10
- //keepalive: true,
11
- livereload : true ,
12
- //debug: true,
13
15
open : 'http://localhost:8000/examples/testsuite.html'
14
16
}
17
+ } ,
18
+ test : {
19
+ options : {
20
+ open : 'http://localhost:8000/test/'
21
+ }
15
22
}
16
23
} ,
17
24
watch : {
@@ -45,7 +52,8 @@ grunt.initConfig({
45
52
}
46
53
}
47
54
} ) ;
48
- grunt . registerTask ( 'default' , [ 'connect' , 'watch' ] ) ;
55
+ grunt . registerTask ( 'default' , [ 'connect:server' , 'watch' ] ) ;
56
+ grunt . registerTask ( 'test' , [ 'connect:test' , 'watch' ] ) ;
49
57
grunt . registerTask ( 'fetchSamples' , 'fetch sample images from 500px api' , function ( ) {
50
58
var done = this . async ( ) ,
51
59
API500px = require ( '500px' ) . API500px ,
Original file line number Diff line number Diff line change @@ -52,5 +52,10 @@ See [caniuse.com/canvas](http://caniuse.com/canvas)
52
52
53
53
The API is not yet finalized. Look at the code and expect changes.
54
54
55
+ ## Tests
56
+
57
+ You can run the tests using grunt test. Alternatively you can also just run grunt (the default task) and open http://localhost:8000/test/ .
58
+ The test coverage for smartcrop.js is very limited at the moment. I expect to improve this as the code matures and the concepts solidify.
59
+
55
60
## License
56
61
Copyright (c) 2014 Jonas Wanger, licensed under the MIT License (enclosed)
Original file line number Diff line number Diff line change 1
1
< html >
2
2
< head >
3
3
< meta charset ="utf-8 ">
4
- < title > Mocha Tests</ title >
4
+ < title > smartcrop.js Mocha Tests</ title >
5
5
< link rel ="stylesheet " href ="../node_modules/mocha/mocha.css " />
6
6
</ head >
7
7
< body >
15
15
</ script >
16
16
< script src ="smartcrop.js "> </ script >
17
17
< script >
18
- mocha . checkLeaks ( ) ;
19
- mocha . globals ( [ 'jQuery' , 'LiveReload' , '__screenCapturePageContext__' ] ) ;
18
+ // mocha.checkLeaks();
19
+ // mocha.globals(['jQuery', 'LiveReload', '__screenCapturePageContext__']);
20
20
mocha . run ( ) ;
21
21
</ script >
22
22
</ body >
You can’t perform that action at this time.
0 commit comments