Skip to content

Commit bbfa220

Browse files
committed
Fix shfmt test to support multiple shfmt versions
The error message that we expect from one of our tests is different depending upon which version of shfmt is being run. Fix the test to accept both error messages.
1 parent f5fa4b5 commit bbfa220

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/src/shfmt/__tests__/index.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ describe('formatter', () => {
6969
shfmtConfig: { languageDialect: 'posix' },
7070
})
7171
}).rejects.toThrow(
72-
/Shfmt: exited with status 1: .*\/testing\/fixtures\/shfmt.sh:25:14: the "function" builtin exists in bash; tried parsing as posix/,
72+
/Shfmt: exited with status 1: .*\/testing\/fixtures\/shfmt\.sh:25:14: (the "function" builtin exists in bash; tried parsing as posix|a command can only contain words and redirects; encountered \()/,
7373
)
7474
})
7575

0 commit comments

Comments
 (0)