Skip to content
This repository has been archived by the owner on Dec 6, 2021. It is now read-only.

Support automated test creation system #37

Closed
Raagh opened this issue Jul 5, 2019 · 1 comment
Closed

Support automated test creation system #37

Raagh opened this issue Jul 5, 2019 · 1 comment
Assignees
Labels
feature request New feature or request

Comments

@Raagh
Copy link
Owner

Raagh commented Jul 5, 2019

@Raagh Okay I found out the issue. We created internally a decorator system to create jasmine test using classes. For example:

@TestSuite('MyTestSuite')
export class MyTestSuite {
  @BeforeEach()
  public beforeEach() {
  }
 
  @Test()
  public async someTest() {
  }
}

will generate a suite with the name MyTestSuite and the someTest test

Looking at your code, I think you match the files content to find the test matching those files. Having a way to configure the regex to match these decorator for me would be wonderful.

Originally posted by @plchampigny in #35 (comment)

@Raagh
Copy link
Owner Author

Raagh commented Jul 5, 2019

I understand the system, but I don't understand why tests are not being matched.

If you create the jasmine tests using those classes the "angular-karma_test-explorer/src/core/shared/path-finder.ts" should still found those jasmine tests that were created and use those. It will not map to the classes for sure but why is not mapping to those created jasmine tests? can you give me an example jasmine test suite that is created? is your structure not matching the pattern used for getting the paths in this line ?

I am afraid that just having a property for the regex will not be enough if you re planning to match spec names to the classes instead of the test files, as PathFinder is also expecting to find keywords like "describe" and "it" it would need a complete new implementation. Maybe I can make a plugin implementation so that you can submit your own PathFinder implementation to the explorer and use that one instead. I need to do more investigation on this subject.

@Raagh Raagh self-assigned this Jul 5, 2019
@Raagh Raagh added the feature request New feature or request label Jul 5, 2019
@Raagh Raagh closed this as completed Dec 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant