@@ -76,33 +76,29 @@ describe('detect', () => {
7676 it ( 'should detect labels in a local file' , async ( ) => {
7777 const output = execSync ( `${ cmd } labels ${ files [ 4 ] . localPath } ` ) ;
7878 assert . match ( output , / L a b e l s : / ) ;
79- assert . match ( output . toLowerCase ( ) , / c a t / ) ;
79+ assert . match ( output , / c a t / i ) ;
8080 } ) ;
8181
8282 it ( 'should detect labels in a remote file' , async ( ) => {
8383 const output = execSync ( `${ cmd } labels-gcs ${ bucketName } ${ files [ 4 ] . name } ` ) ;
8484 assert . match ( output , / L a b e l s : / ) ;
85- assert . match ( output . toLowerCase ( ) , / c a t / ) ;
85+ assert . match ( output , / c a t / i ) ;
8686 } ) ;
8787
8888 it ( 'should detect landmarks in a local file' , async ( ) => {
8989 const output = execSync ( `${ cmd } landmarks ${ files [ 1 ] . localPath } ` ) ;
9090 assert . match ( output , / L a n d m a r k s : / ) ;
91- // something changed in the output and this text is no longer in the output
92- // however, the API call itself still works, commenting this out so
93- // it's not breaking the tests.
94- // assert.match(output, /Palace of Fine Arts/i);
91+ // FLAKY: confirm there is output, if not an exact match
92+ assert . match ( output , / d e s c r i p t i o n : / i) ;
9593 } ) ;
9694
9795 it ( 'should detect landmarks in a remote file' , async ( ) => {
9896 const output = execSync (
9997 `${ cmd } landmarks-gcs ${ bucketName } ${ files [ 1 ] . name } `
10098 ) ;
10199 assert . match ( output , / L a n d m a r k s : / ) ;
102- // something changed in the output and this text is no longer in the output
103- // however, the API call itself still works, commenting this out so
104- // it's not breaking the tests.
105- // assert.match(output, /Palace of Fine Arts/i);
100+ // FLAKY: confirm there is output, if not an exact match
101+ assert . match ( output , / d e s c r i p t i o n : / i) ;
106102 } ) ;
107103
108104 it ( 'should detect text in a local file' , async ( ) => {
@@ -118,21 +114,17 @@ describe('detect', () => {
118114 } ) ;
119115
120116 it ( 'should detect logos in a local file' , async ( ) => {
121- const output = execSync ( `${ cmd } logos ${ files [ 9 ] . localPath } ` ) ;
117+ const output = execSync ( `${ cmd } logos ${ files [ 2 ] . localPath } ` ) ;
122118 assert . match ( output , / L o g o s : / ) ;
123- // something changed in the output and this text is no longer in the output
124- // however, the API call itself still works, commenting this out so
125- // it's not breaking the tests.
126- // assert.match(output, /Google/);
119+ // confirm output with a description, but not necessarily an exact value
120+ assert . match ( output , / d e s c r i p t i o n : / i) ;
127121 } ) ;
128122
129123 it ( 'should detect logos in a remote file' , async ( ) => {
130- const output = execSync ( `${ cmd } logos-gcs ${ bucketName } ${ files [ 9 ] . name } ` ) ;
124+ const output = execSync ( `${ cmd } logos-gcs ${ bucketName } ${ files [ 2 ] . name } ` ) ;
131125 assert . match ( output , / L o g o s : / ) ;
132- // something changed in the output and this text is no longer in the output
133- // however, the API call itself still works, commenting this out so
134- // it's not breaking the tests.
135- // assert.match(output, /Google/);
126+ // confirm output with a description, but not necessarily an exact value
127+ assert . match ( output , / d e s c r i p t i o n : / i) ;
136128 } ) ;
137129
138130 it ( 'should detect properties in a local file' , async ( ) => {
0 commit comments