Skip to content

Commit 8840c20

Browse files
committed
Try to fix
1 parent f18b7db commit 8840c20

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/commands/json/cmd-json.test.mts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,8 @@ describe('socket json', async () => {
112112
'should print a socket.json when found',
113113
async cmd => {
114114
const { code, stderr, stdout } = await invokeNpm(binCliPath, cmd)
115-
expect(stdout).toMatchInlineSnapshot(`
115+
// (Must normalize newlines to fix snapshot test for Windows)
116+
expect(stdout.replace(/\\r\\n/g, '\\n').replace(/(?:\\r|\\x0d)/g, '')).toMatchInlineSnapshot(`
116117
"{
117118
" _____ _ _ ": "Local config file for Socket CLI tool ( https://npmjs.org/socket ), to work with https://socket.dev",
118119
"| __|___ ___| |_ ___| |_ ": " The config in this file is used to set as defaults for flags or cmmand args when using the CLI",

src/commands/scan/cmd-scan-reach.test.mts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ describe('socket scan reach', async () => {
2020
$ socket scan reach [CWD=.]
2121
2222
Options
23-
--interactive Allow for interactive elements, asking for input. Use --no-interactive to prevent any input questions, defaulting them to cancel/no.
2423
--json Output result as json
2524
--markdown Output result as markdown
2625
@@ -55,9 +54,7 @@ describe('socket scan reach', async () => {
5554
_____ _ _ /---------------
5655
| __|___ ___| |_ ___| |_ | Socket.dev CLI ver <redacted>
5756
|__ | * | _| '_| -_| _| | Node: <redacted>, API token set: <redacted>
58-
|_____|___|___|_,_|___|_|.dev | Command: \`socket scan reach\`, cwd: <redacted>
59-
60-
\\x1b[34mi\\x1b[39m If you dont have any interactive bits then drop the flag true"
57+
|_____|___|___|_,_|___|_|.dev | Command: \`socket scan reach\`, cwd: <redacted>"
6158
`)
6259

6360
expect(code, 'dry-run should exit with code 0 if input ok').toBe(0)

0 commit comments

Comments
 (0)