Be more lenient in accepting command inputs (#405)

* Be more lenient in accepting command inputs
This commit is contained in:
Thomas Boop
2020-04-09 17:00:53 -04:00
committed by GitHub
parent a6a5d98be8
commit 5b940ebda7
4 changed files with 109 additions and 24 deletions
+15
View File
@@ -112,6 +112,21 @@ describe('@actions/core/src/command', () => {
`::some-command prop1=value 1,prop2=value 2,prop3=value 3::${os.EOL}`
])
})
it('should handle issueing commands for non-string objects', () => {
command.issueCommand(
'some-command',
{
prop1: ({test: 'object'} as unknown) as string,
prop2: (123 as unknown) as string,
prop3: (true as unknown) as string
},
({test: 'object'} as unknown) as string
)
assertWriteCalls([
`::some-command prop1={"test"%3A"object"},prop2=123,prop3=true::{"test":"object"}${os.EOL}`
])
})
})
// Assert that process.stdout.write calls called only with the given arguments.