t.fixture Property
Type: Object
The t.fixture
object stores information about the fixture (read-only).
Property | Type | Description |
---|---|---|
name |
String | Fixture name |
meta |
Object | Fixture metadata |
path |
String | Fixture file path |
fixture `Example Fixture`
.page `http://example.com`
.meta({ fixtureMeta: 'v' })
.beforeEach( async t => {
const fixtureName = t.fixture.name; /* Example Fixture */
const fixtureMeta = t.fixture.meta; /* { fixtureMeta: 'v' } */
const fixturePath = t.fixture.path; /* /Users/dan/testcafe/fixture.js */
})
test
('MyTest', async t => { /* ... */ })
.after( async t => {
const fixtureName = t.fixture.name; /* Example Fixture */
const fixtureMeta = t.fixture.meta; /* { fixtureMeta: 'v' } */
const fixturePath = t.fixture.path; /* /Users/dan/testcafe/fixture.js */
});