@@ -31,29 +31,23 @@ test.before(tools.checkCredentials);
3131// redact_string
3232test ( `should redact multiple sensitive data types from a string` , async t => {
3333 const output = await tools . runAsync (
34- `${
35- cmd
36- } string "I am Gary and my phone number is (123) 456-7890." REDACTED -t US_MALE_NAME PHONE_NUMBER`,
34+ `${ cmd } string "I am Gary and my phone number is (123) 456-7890." REDACTED -t US_MALE_NAME PHONE_NUMBER` ,
3735 cwd
3836 ) ;
3937 t . is ( output , 'I am REDACTED and my phone number is REDACTED.' ) ;
4038} ) ;
4139
4240test ( `should redact a single sensitive data type from a string` , async t => {
4341 const output = await tools . runAsync (
44- `${
45- cmd
46- } string "I am Gary and my phone number is (123) 456-7890." REDACTED -t PHONE_NUMBER`,
42+ `${ cmd } string "I am Gary and my phone number is (123) 456-7890." REDACTED -t PHONE_NUMBER` ,
4743 cwd
4844 ) ;
4945 t . is ( output , 'I am Gary and my phone number is REDACTED.' ) ;
5046} ) ;
5147
5248test ( `should report string redaction handling errors` , async t => {
5349 const output = await tools . runAsync (
54- `${
55- cmd
56- } string "My name is Gary and my phone number is (123) 456-7890." REDACTED -t BAD_TYPE`,
50+ `${ cmd } string "My name is Gary and my phone number is (123) 456-7890." REDACTED -t BAD_TYPE` ,
5751 cwd
5852 ) ;
5953 t . regex ( output , / E r r o r i n r e d a c t S t r i n g / ) ;
@@ -63,9 +57,7 @@ test(`should report string redaction handling errors`, async t => {
6357test ( `should redact a single sensitive data type from an image` , async t => {
6458 const testName = `redact-multiple-types` ;
6559 const output = await tools . runAsync (
66- `${ cmd } image ${ testImage } ${
67- testName
68- } .result.png -t PHONE_NUMBER EMAIL_ADDRESS`,
60+ `${ cmd } image ${ testImage } ${ testName } .result.png -t PHONE_NUMBER EMAIL_ADDRESS` ,
6961 cwd
7062 ) ;
7163
@@ -113,15 +105,11 @@ test(`should report image redaction handling errors`, async t => {
113105// CLI options
114106test ( `should have a minLikelihood option` , async t => {
115107 const promiseA = tools . runAsync (
116- `${
117- cmd
118- } string "My phone number is (123) 456-7890." REDACTED -t PHONE_NUMBER -m VERY_LIKELY`,
108+ `${ cmd } string "My phone number is (123) 456-7890." REDACTED -t PHONE_NUMBER -m VERY_LIKELY` ,
119109 cwd
120110 ) ;
121111 const promiseB = tools . runAsync (
122- `${
123- cmd
124- } string "My phone number is (123) 456-7890." REDACTED -t PHONE_NUMBER -m UNLIKELY`,
112+ `${ cmd } string "My phone number is (123) 456-7890." REDACTED -t PHONE_NUMBER -m UNLIKELY` ,
125113 cwd
126114 ) ;
127115
0 commit comments