Dear @xmlking ,
thanks again for this really (!) awesome (!) starter package. This is a piece of art 😆
I recently added my own package to the libs folder and it worked like a charm. Then i started to write tests. In this context, however, i stumbled upon a few questions. Maybe you can help me with the latter?
1) Running tests via IDE:
Consider, for example, the following "dummy" test-case:
describe('Something', () => {
it('should be ok', () => {
expect(true).toBeTruthy();
});
});
Obviously, this test should pass. As I use IntelliJ WebStorm, i see the green "run" buttons next to describe() and it() to specifically run one specific test or an entire suite. However, when clicking this button, it errors with:
ts-jest[config] (WARN) TypeScript diagnostics (customize using `[jest-config].globals.ts-jest.diagnostics` option):
if i run the test via console
it runs all tests and they pass.
2) Configuration & Schemantics
When creating a new lib in the project via ng g lib NAME it automatically modifies the .\angular.json file. In this context, it creates a key in projects.NAME, where some basic configuration stuff is located.
However, i noticed, that in my "own generated" libs the key projects.NAME.architect.test.options.setupFile is missing. Further, the referenced file (e.g., libs/NAME/src/test-setup.ts) is also missing / not generated!
3) "Hiding" Test Classes in Packages
In order to test certain functionality, i created some dummy classes (e.g,. a Book and Author class). Respective classes are, for example, located in libs/NAME/test/mocks/book.ts.
Of course, these classes are only vital for this specific library and does not need to be available in other. How can i "hide" them in other packages (e.g., disable the "intelli sense" auto-completion) for such "test classes"? Is this possible?
Thank you so much for this awesome project! You rock!
All the best from Germany
Dear @xmlking ,
thanks again for this really (!) awesome (!) starter package. This is a piece of art 😆
I recently added my own package to the
libsfolder and it worked like a charm. Then i started to write tests. In this context, however, i stumbled upon a few questions. Maybe you can help me with the latter?1) Running tests via IDE:
Consider, for example, the following "dummy" test-case:
Obviously, this test should pass. As I use
IntelliJ WebStorm, i see the green "run" buttons next todescribe()andit()to specifically run one specific test or an entire suite. However, when clicking this button, it errors with:if i run the test via console
it runs all tests and they pass.
2) Configuration & Schemantics
When creating a new
libin the project viang g lib NAMEit automatically modifies the.\angular.jsonfile. In this context, it creates a key inprojects.NAME, where some basic configuration stuff is located.However, i noticed, that in my "own generated" libs the key
projects.NAME.architect.test.options.setupFileis missing. Further, the referenced file (e.g.,libs/NAME/src/test-setup.ts) is also missing / not generated!3) "Hiding" Test Classes in Packages
In order to test certain functionality, i created some dummy classes (e.g,. a
BookandAuthorclass). Respective classes are, for example, located inlibs/NAME/test/mocks/book.ts.Of course, these classes are only vital for this specific library and does not need to be available in other. How can i "hide" them in other packages (e.g., disable the "intelli sense" auto-completion) for such "test classes"? Is this possible?
Thank you so much for this awesome project! You rock!
All the best from Germany