Skip to content

unable to inject data between workers because of proxy object #5066

@JoeAnantham

Description

@JoeAnantham

I am using Codeceptjs with Playwright along with Mochawesome

I had my custom parallel runner following the example provided in Codeceptjs website. But with recent changes in 3.7.0 , when I try to inject data between workers, it is coming as proxy object. Can any one tell me if anything that we need to do differently to get the data flowing between workers. Below is my setup in config file and parallel runner.js

codecept.conf.js

bootstrap() {
share({ testData: false})
}

Inside my custom parallels runner file, I was reading the testData and then assigning values to it , so that I can read the same from any worker
const testDataJson = require ('../testDataModel')

let testData = inject()
if(! testData) {
testData = testDataJson

Now with recent changes from 3.7.0, testData becomes proxy object and unable to assign anything. Any workaround to do this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions