Compare commits

...

2 Commits

Author SHA1 Message Date
JoannaaKL e0eab1f58d . 2023-11-09 13:48:39 +00:00
JoannaaKL 30dbb496d3 test 2023-11-09 13:20:38 +00:00
+18
View File
@@ -168,6 +168,24 @@ describe('@actions/core', () => {
])
})
it('setSecret produces the correct command 2', () => {
core.setSecret('secret val %')
core.setSecret('multi\nline\r\nsecret')
assertWriteCalls([
`::add-mask::secret val %25${os.EOL}`,
`::add-mask::multi%0Aline%0D%0Asecret${os.EOL}`
])
})
it('setSecret produces the correct command 3', () => {
core.setSecret('secret val %25')
core.setSecret('multi\nline\r\nsecret')
assertWriteCalls([
`::add-mask::secret val %2525${os.EOL}`,
`::add-mask::multi%0Aline%0D%0Asecret${os.EOL}`
])
})
it('prependPath produces the correct commands and sets the env', () => {
const command = 'PATH'
createFileCommandFile(command)