Comments (5)
Hi pierre, thank you for submitting the bug. I will take a look at it tonight when I get home and create a test to reproduce it. That stacktrace seems to be enough to fix it. Could you do one try just to be sure, if you try it on a freshly created angular cli project does it work?
from angular-karma_test-explorer.
@plchampigny I just pushed the fix for your problem. In a few minutes the new version should be built and published by the pipeline.
The problem is that if that's the case then some of your tests don't have a filePath(its undefined) then for those tests the show source function will not work.
I have tried it with my work project, and with a freshly created angular cli project and it works on both. could you provide me with an example test that doesn't have a filePath? could you show me your test structure so I can replicate the problem?
from angular-karma_test-explorer.
@Raagh I'm testing the new extension, I've was about to post an error but it seems my vscode didnt reload the extension. I'll be investigating on my side which test doesnt have the goto file feature and check the reason why they dont.
from angular-karma_test-explorer.
@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.
from angular-karma_test-explorer.
@plchampigny 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 test class 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.
from angular-karma_test-explorer.
Related Issues (20)
- Extension issue HOT 8
- stderr: Install for [ '@angular/cli@latest' ] failed with code 1
- Make Angular/Karma Test Explorer work with test frameworks other than Jasmine HOT 1
- Nesting describe-elements issue
- Support for Karma version 6 HOT 8
- stderr: 'ng' is not recognized as an internal or external command HOT 1
- Can't debug Angular 10 tests HOT 1
- Infinite Spinner: Cypress Screenshots directories trip up the reporter
- Debug throw error about Cannot connect to the target at localhost HOT 2
- Update Extension to indicate Status HOT 1
- Code coverage report(s) HOT 2
- Infinitely searching for tests HOT 12
- Debugger for Chrome extension is now retired (now vscode built-in extension) HOT 4
- Remote Development - Ability to customize extension's internal Karma browser configuration HOT 2
- Tests are discovered but Code Lens and Show Source buttons are not displayed HOT 9
- Ability to supply environment variables required for test execution HOT 1
- Discovered tests are from another project HOT 1
- Failed Test Highlights row below issue HOT 1
- Unable to see tests in Test Explorer using HOT 12
- Open to additional Maintainers? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-karma_test-explorer.