@@ -219,7 +219,7 @@ describe('execution', () => {
219219 }
220220 } ) ;
221221
222- it ( 'shoud start Parse Server' , done => {
222+ it ( 'should start Parse Server' , done => {
223223 childProcess = spawn ( binPath , [
224224 '--appId' ,
225225 'test' ,
@@ -241,7 +241,16 @@ describe('execution', () => {
241241 } ) ;
242242 } ) ;
243243
244- it ( 'shoud start Parse Server with GraphQL' , done => {
244+ it ( 'should throw without masterKey and appId' , done => {
245+ childProcess = spawn ( binPath , [ ] ) ;
246+ childProcess . stderr . on ( 'data' , data => {
247+ if ( data . toString ( ) . includes ( 'ERROR: appId and masterKey are required' ) ) {
248+ done ( ) ;
249+ }
250+ } ) ;
251+ } ) ;
252+
253+ it ( 'should start Parse Server with GraphQL' , done => {
245254 childProcess = spawn ( binPath , [
246255 '--appId' ,
247256 'test' ,
@@ -267,7 +276,7 @@ describe('execution', () => {
267276 } ) ;
268277 } ) ;
269278
270- it ( 'shoud start Parse Server with GraphQL and Playground' , done => {
279+ it ( 'should start Parse Server with GraphQL and Playground' , done => {
271280 childProcess = spawn ( binPath , [
272281 '--appId' ,
273282 'test' ,
@@ -294,4 +303,28 @@ describe('execution', () => {
294303 done . fail ( data . toString ( ) ) ;
295304 } ) ;
296305 } ) ;
306+
307+ it ( 'should redact push keys' , done => {
308+ childProcess = spawn ( binPath , [
309+ '--appId' ,
310+ 'test' ,
311+ '--masterKey' ,
312+ 'test' ,
313+ '--databaseURI' ,
314+ 'mongodb://localhost/test' ,
315+ '--port' ,
316+ '1341' ,
317+ '--push' ,
318+ '123' ,
319+ ] ) ;
320+ childProcess . stdout . on ( 'data' , data => {
321+ data = data . toString ( ) ;
322+ if ( data . includes ( '**REDACTED**' ) ) {
323+ done ( ) ;
324+ }
325+ } ) ;
326+ childProcess . stderr . on ( 'data' , data => {
327+ done . fail ( data . toString ( ) ) ;
328+ } ) ;
329+ } ) ;
297330} ) ;
0 commit comments