Hi,
I've been trying out Copy behaviour with tcp (text), but keep running into the following error
"message":"Cannot assign to read only property '0' of string 'My name is ${groups}[0] ${groups}[1]'","name":"TypeError","stack":"TypeError: Cannot assign to read only property '0' of string 'My name is ${groups}[0] ${groups}[1]'\n
/src/models/behaviors.js:344:22)
Am I mis-configuring?
Thanks
{
"protocol": "tcp",
"port": 8888,
"numberOfRequests": 0,
"recordRequests": true,
"mode": "text",
"requests": [],
"stubs": [
{
"name": "auth",
"predicates": [
{
"matches": { "data": "bruce(.*?)" }
}
],
"responses": [
{
"is" :"My name is ${groups}[0] ${groups}[1]"
,
"behaviors": [
{
"copy": {
"from": "data",
"into": "${groups}",
"using": {
"method": "regex",
"selector": "^(.*?) (.*?)$",
"options": { "ignoreCase": true }
}
}
}]
}]
}
]
}