Betterment / alchemist

A Flutter tool that makes golden testing easy.
MIT License
251 stars 35 forks source link

Call setUp Method between GoldenTestScenario #102

Closed jamontes79 closed 10 months ago

jamontes79 commented 12 months ago

Is there a way to call the setUp method between GoldenTestScenario inside the same GoldenTestGroup?

Example:

 group('Golden Tests', () {
     setUp(() {
           ... some stuff
     });

   goldenTest(
      'name',
      fileName: 'fileanme',
      pumpBeforeTest:  precacheImages,
      builder: () {
        return GoldenTestGroup(
          children: [
            GoldenTestScenario(
              name: 'Secenario 1',
              child: Container(),
            ),       
          GoldenTestScenario(
              name: 'Secenario 2,
              child: Container(),
            ),
          ],
        );
      },
    );
});

I would like to have the following calls:

Thanks in advance and thanks for the library :)