I would like to stub a private variable inside a class

```
class IPC {
    private publisher: redis.RedisClient;
    constructor() {
        this.publisher = redis.createClient();
    }

    publish(text: string) {
        const msg = {
            text: text
        };

        this.publisher.publish('hello', JSON.stringify(msg));
    }
}

```

How can I stub the private variable `publisher` , inside this class?
so I could test the code as shown below

```
it('should return text object', () => {
    const ipc = sinon.createStubInstance(IPC);
    ipc.publish('world!');

    // this will throw error, because ipc.publisher is undefined
    assert.deepStrictEqual({
        text: 'world!'
    }, ipc.publisher.getCall(0).args[0]) 
})

```