t.ctx Property

References the test context object. Each test has a test context object of its own. Store data within the test context object to share information between test hooks and the test body.

t.ctx → Object

You can completely redefine t.ctx or simply add a property to the object:

fixture `Fixture1`
    .beforeEach(async t  => {
        t.ctx.someProp = 123;
    });

test
    ('Test1', async t => {
        console.log(t.ctx.someProp); // > 123
    })
    .after(async t => {
         console.log(t.ctx.someProp); // > 123
    });

Note

t.ctx is initialized with an empty object without a prototype. You can iterate its keys without the hasOwnProperty check.