Lifetime of an actors note when using mocha specs
See original GitHub issueHi @jan-molak,
I did some experiments with the new notes feature using Serenity/JS 3.0.0-rc18 and the mocha template, to keep it simple.
Given an Actor
- using a notepad
- that is not shared
- that is either typed or untyped
then the note is just available in the mocha it block where it was set.
Though I’m in the same spec and in the same describe block, the note is not available when using an untyped note or set back to the initial value when using the typed notepad.
Is this intended? This is basically the scenario which led to my question about the lifecylce of an actor.
As the the Actor gets configured here should the note not be available for an actor called by the same name?
To have the notes available I would have to use a shared notepad, but this would apply to all actors, wouldn’t it?
Issue Analytics
- State:
- Created a year ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Mocha: create and finalize test programmatically
To integrate with mocha this implementation describes a custom mocha interface to proxy test results from tests executed in another environment ...
Read more >mocha/mocha.js - chromium/src/third_party - Git at Google
Note : cannot use `length < kMaxLength()` here because that fails when. // length is NaN (which is otherwise coerced to zero.).
Read more >2017-22-LORT-AEA-Agreement-Unsigned.pdf
Agreement, requests the removal of any arbitrator by notice in writing ... If the Actor is required to use body make-up, the Theatre...
Read more >Actor - | Serenity/JS
Retrieves actor's Ability to doSomething . Please note that this method performs an instancepf check against abilities given to this actor via Actor#whoCan....
Read more >Oral and Long-Acting Injectable Cabotegravir and Rilpivirine ...
Note : For Cohort 1 Step 2 participants, body weight will not be exclusionary for enrollment into Cohort 2 Step 3, if otherwise...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Thanks, Jan! This example with
finally helped me to understand the whole (technical) concept behind the actors (and their lifetime) a bit more.
Exactly. Well, technically speaking, even a call to
actorCalled('somehow')without specificying the task would instantiate an actor. It’s a bit like initialising a constant before you do something with it.Right, that’s because the second call to
engageresets theCastset by the first call.Remember, that you can always do something a bit simpler, which is to have one implementation of the
Cast, and differentiate between the actors based on their names.For example:
Yeah, I’d suggest avoiding test scenarios depending on the order of execution, since that prevents people from executing scenarios individually.