1818const supertest = require ( 'supertest' ) ;
1919const request = supertest ( process . env . BASE_URL ) ;
2020
21- describe ( 'Validate encoding field' , function ( ) {
22- it ( 'should fail if encoding field is missing.' , function ( done ) {
21+ describe ( 'Validate encoding field' , ( ) => {
22+ it ( 'should fail if encoding field is missing.' , done => {
2323 request
2424 . post ( '/speechTranslate' )
2525 . send ( {
@@ -30,7 +30,7 @@ describe('Validate encoding field', function() {
3030 } )
3131 . expect ( 400 , 'Invalid encoding.' , done ) ;
3232 } ) ;
33- it ( 'should fail if encoding field is empty.' , function ( done ) {
33+ it ( 'should fail if encoding field is empty.' , done => {
3434 request
3535 . post ( '/speechTranslate' )
3636 . send ( {
@@ -43,8 +43,8 @@ describe('Validate encoding field', function() {
4343 } ) ;
4444} ) ;
4545
46- describe ( 'Validate sampleRateHertz field' , function ( ) {
47- it ( 'should fail if sampleRateHertz field is missing.' , function ( done ) {
46+ describe ( 'Validate sampleRateHertz field' , ( ) => {
47+ it ( 'should fail if sampleRateHertz field is missing.' , done => {
4848 request
4949 . post ( '/speechTranslate' )
5050 . send ( {
@@ -55,7 +55,7 @@ describe('Validate sampleRateHertz field', function() {
5555 } )
5656 . expect ( 400 , 'Sample rate hertz must be numeric.' , done ) ;
5757 } ) ;
58- it ( 'should fail if sampleRateHertz field is empty.' , function ( done ) {
58+ it ( 'should fail if sampleRateHertz field is empty.' , done => {
5959 request
6060 . post ( '/speechTranslate' )
6161 . send ( {
@@ -66,7 +66,7 @@ describe('Validate sampleRateHertz field', function() {
6666 } )
6767 . expect ( 400 , 'Sample rate hertz must be numeric.' , done ) ;
6868 } ) ;
69- it ( 'should fail if sampleRateHertz field is not numeric.' , function ( done ) {
69+ it ( 'should fail if sampleRateHertz field is not numeric.' , done => {
7070 request
7171 . post ( '/speechTranslate' )
7272 . send ( {
@@ -79,8 +79,8 @@ describe('Validate sampleRateHertz field', function() {
7979 } ) ;
8080} ) ;
8181
82- describe ( 'Validate languageCode field' , function ( ) {
83- it ( 'should fail if languageCode field is missing.' , function ( done ) {
82+ describe ( 'Validate languageCode field' , ( ) => {
83+ it ( 'should fail if languageCode field is missing.' , done => {
8484 request
8585 . post ( '/speechTranslate' )
8686 . send ( {
@@ -91,7 +91,7 @@ describe('Validate languageCode field', function() {
9191 } )
9292 . expect ( 400 , 'Invalid language code.' , done ) ;
9393 } ) ;
94- it ( 'should fail if languageCode field is empty.' , function ( done ) {
94+ it ( 'should fail if languageCode field is empty.' , done => {
9595 request
9696 . post ( '/speechTranslate' )
9797 . send ( {
@@ -104,8 +104,8 @@ describe('Validate languageCode field', function() {
104104 } ) ;
105105} ) ;
106106
107- describe ( 'Validate audioContent field' , function ( ) {
108- it ( 'should fail if audioContent field is missing.' , function ( done ) {
107+ describe ( 'Validate audioContent field' , ( ) => {
108+ it ( 'should fail if audioContent field is missing.' , done => {
109109 request
110110 . post ( '/speechTranslate' )
111111 . send ( {
@@ -116,7 +116,7 @@ describe('Validate audioContent field', function() {
116116 } )
117117 . expect ( 400 , 'Invalid audio content.' , done ) ;
118118 } ) ;
119- it ( 'should fail if audioContent field is empty.' , function ( done ) {
119+ it ( 'should fail if audioContent field is empty.' , done => {
120120 request
121121 . post ( '/speechTranslate' )
122122 . send ( {
0 commit comments