Skip to content

Repeated setUp() with TestCase inheritance #31

Description

@thomaskoehn-kisi

Let's call it rather a question than an issue – not sure if it is intended or not. I have:

// file ATestCase
class ATestCase extends ImpTestCase {
  setUp() { some code }
}
class BTestCase extends ATestCase {
  testSomething() { some code }
}

when I run impt test with ATestCase::testSomething, the order of execution is:

  • BTestCase::setUp
  • BTestCase::testSomething
  • ATestCase::setUp

I am confused why ATestCase::setUp is called, don't really want it – and would think it is incorrect (especially at that point in time).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions