You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
describe('the validation works correctly', (task) => {
47
+
// assign "decorated" during collection
48
+
task.file.meta.decorated = false
49
+
50
+
test('some test', ({ task }) => {
51
+
// assign "decorated" during test run, it will be available
52
+
// only in onTestCaseReady hook
53
+
task.file.meta.decorated = false
54
+
})
55
+
})
56
+
```
57
+
58
+
:::tip
59
+
Ifmetadatawasattachedduringcollection (outsideofthe`test`function), then it will be available in [`onTestModuleCollected`](./reporters#ontestmodulecollected) hook in the custom reporter.
60
+
:::
61
+
35
62
## diagnostic
36
63
37
64
```ts
@@ -63,5 +90,10 @@ interface ModuleDiagnostic {
63
90
* Accumulated duration of all tests and hooks in the module.
64
91
*/
65
92
readonlyduration: number
93
+
/**
94
+
* The amount of memory used by the module in bytes.
95
+
* This value is only available if the test was executed with `logHeapUsage` flag.
describe('the validation works correctly', (task) => {
206
+
// assign "decorated" during collection
207
+
task.meta.decorated = false
208
+
209
+
test('some test', ({ task }) => {
210
+
// assign "decorated" during test run, it will be available
211
+
// only in onTestCaseReady hook
212
+
task.suite.meta.decorated = false
213
+
})
214
+
})
215
+
```
216
+
217
+
:::tip
218
+
Ifmetadatawasattachedduringcollection (outsideofthe`test`function), then it will be available in [`onTestModuleCollected`](./reporters#ontestmodulecollected) hook in the custom reporter.
0 commit comments