@@ -351,7 +351,7 @@ describe('Model Armor tests', () => {
351
351
352
352
it ( 'should not detect CSAM in appropriate model response' , async ( ) => {
353
353
const testModelResponse =
354
- 'Here is information about online safety for children ' ;
354
+ 'Here is how to teach long division to a child ' ;
355
355
356
356
const output = execSync (
357
357
`node snippets/sanitizeModelResponse.js ${ projectId } ${ locationId } ${ basicTemplateId } "${ testModelResponse } "`
@@ -378,8 +378,6 @@ describe('Model Armor tests', () => {
378
378
379
379
assert . include ( output , expectedValue ) ;
380
380
381
- assert . include ( output , 'csam' ) ;
382
- assert . include ( output , '"matchState": "NO_MATCH_FOUND"' ) ;
383
381
} ) ;
384
382
385
383
it ( 'should not detect issues in model response with empty template' , async ( ) => {
@@ -391,8 +389,6 @@ describe('Model Armor tests', () => {
391
389
) . toString ( ) ;
392
390
393
391
assert . include ( output , '"filterMatchState": "NO_MATCH_FOUND"' ) ;
394
- assert . include ( output , 'csam' ) ;
395
- assert . include ( output , '"matchState": "NO_MATCH_FOUND"' ) ;
396
392
} ) ;
397
393
398
394
it ( 'should detect PII in model response with basic SDP template' , async ( ) => {
@@ -409,8 +405,6 @@ describe('Model Armor tests', () => {
409
405
410
406
// Check for US_INDIVIDUAL_TAXPAYER_IDENTIFICATION_NUMBER in findings
411
407
assert . match ( output , / U S _ I N D I V I D U A L _ T A X P A Y E R _ I D E N T I F I C A T I O N _ N U M B E R / ) ;
412
- assert . include ( output , 'csam' ) ;
413
- assert . include ( output , '"matchState": "NO_MATCH_FOUND"' ) ;
414
408
} ) ;
415
409
416
410
// =================== Model Response with User Prompt Tests ===================
@@ -426,8 +420,6 @@ describe('Model Armor tests', () => {
426
420
) . toString ( ) ;
427
421
428
422
assert . include ( output , '"filterMatchState": "NO_MATCH_FOUND"' ) ;
429
- assert . include ( output , 'csam' ) ;
430
- assert . include ( output , '"matchState": "NO_MATCH_FOUND"' ) ;
431
423
} ) ;
432
424
433
425
it ( 'should sanitize model response with user prompt using advanced SDP template' , async ( ) => {
@@ -446,9 +438,6 @@ describe('Model Armor tests', () => {
446
438
assert . include ( output , '"matchState": "MATCH_FOUND"' ) ;
447
439
448
440
assert . notInclude ( output , '[email protected] ' ) ;
449
-
450
- assert . include ( output , 'csam' ) ;
451
- assert . include ( output , '"matchState": "NO_MATCH_FOUND"' ) ;
452
441
} ) ;
453
442
454
443
// =================== PDF File Scanning Tests ===================
0 commit comments