Commit 97b5ec3 Nick Santos
committed
1 parent 28ee0a4 commit 97b5ec3 Copy full SHA for 97b5ec3
File tree 3 files changed +39
-2
lines changed
3 files changed +39
-2
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ function launch(options, port) {
48
48
]
49
49
50
50
if ( options . heap ) {
51
- args . push ( '-Xmx= ' + options . heap )
51
+ args . push ( '-Xmx' + options . heap )
52
52
}
53
53
54
54
args . push (
Original file line number Diff line number Diff line change 23
23
"type" : " git" ,
24
24
"url" : " https://github.com/Medium/local-dynamo.git"
25
25
},
26
+ "scripts" : {
27
+ "test" : " ./node_modules/.bin/nodeunit test"
28
+ },
26
29
"dependencies" : {
27
30
"flags" : " 0.1.2" ,
28
31
"kew" : " 0.4.0" ,
29
32
"metrics" : " 0.1.8" ,
30
33
"progress" : " 1.1.8"
31
34
},
32
35
"devDependencies" : {
33
- "aws-sdk" : " ^2.0.22"
36
+ "aws-sdk" : " ^2.0.22" ,
37
+ "nodeunit" : " 0.9.1"
34
38
}
35
39
}
Original file line number Diff line number Diff line change
1
+ // Copyright 2015 A Medium Corporation.
2
+
3
+ var localDynamo = require ( '../lib/launch' )
4
+
5
+ exports . testMemory = function ( test ) {
6
+ var dynamo = localDynamo . launch ( {
7
+ port : 8676 ,
8
+ heap : '512m'
9
+ } )
10
+ dynamo . stdout . on ( 'data' , function ( data ) {
11
+ console . log ( 'stdout' , data . toString ( ) )
12
+ } )
13
+ dynamo . stderr . on ( 'data' , function ( data ) {
14
+ console . log ( 'stderr' , data . toString ( ) )
15
+ } )
16
+
17
+ var finished = false
18
+
19
+ dynamo . on ( 'exit' , function ( code ) {
20
+ if ( finished ) return
21
+
22
+ finished = true
23
+ test . ok ( false , 'Unexpected exit code ' + code )
24
+ test . done ( )
25
+ } )
26
+
27
+ // If everything goes well after 5 seconds, then we're done!
28
+ setTimeout ( function ( ) {
29
+ finished = true
30
+ dynamo . kill ( )
31
+ test . done ( )
32
+ } , 5000 ) . unref ( )
33
+ }
You can’t perform that action at this time.
0 commit comments