Join Slack
Powered by
how can I pass some object from a custom SpecExten...
# kotest
s
Sourabh Rawat
05/31/2021, 4:13 AM
how can I pass some object from a custom SpecExtension to the the Spec so that the test cases can use it?
s
sam
06/01/2021, 2:25 PM
The spec is already constructed before the spec extension is called
sam
06/01/2021, 2:26 PM
you could use a
Copy code
ConstructorExtension
If you want to intercept the construction and pass parameters to it
sam
06/01/2021, 2:26 PM
Alternatively, you could smart cast in SpecExtension and then update if you have vars
3
Views
Open in Slack
Previous
Next