Comments (12)
I have a Gradle task to do this on another project, it might be helpful for this;
https://github.com/craigburke/angular-grails3/blob/master/build.gradle#L86
from five15.
I can grab this one unless you wanted to do it, @VoltiSubito.
from five15.
Go for it.
from five15.
As a side note, as far as I'm concerned anyone can work on any item they wish in the project. @jeffbrown may feel differently.
from five15.
@VoltiSubito I definitely don't want to step on anyone's toes here, so I appreciate that.
I'm not afraid of @jeffbrown. Just kidding, I'm actually completely terrified of him. I heard he once killed a 🐻 by punching it in the face.
from five15.
I'm looking at how to best organize the jasmine tests and I'm a bit torn. I find the rationale for including the tests in the same place as the JS source pretty compelling:
https://github.com/johnpapa/angular-styleguide#style-y197
On the other hand placing them somewhere like src/test/js is nice too because it groups them with the Groovy tests. What's your take on that @VoltiSubito?
from five15.
@craigburke my preference is to have the tests side by side with the implementation with a *.spec.js filename. Since part of this project is how to best marry the Grails and Angular universes I think we should consider breaking from the style guides where it makes sense.
How's that for not-an-answer. 😄
My thought is to follow the style guide unless we can name one or more concrete benefits of doing otherwise because of something in the Grails ecosystem.
from five15.
@VoltiSubito that's the same non-conclusion I've come to 😄
The benefit I see of breaking from the style guide is consistency (since we don't have tests interspersed with source in the Groovy part of the app). I think people would expect in a groovy/java project that tests are in src/test. Here's an example of what that might look like:
https://github.com/craigburke/angular-grails3/tree/master/src/test
We can also go the side by side route although it will require adding some exclusions to the asset pipeline config so that .spec.js files aren't processed or packaged. I don't think that's a huge deal but a minor con for that particular approach. We could definitely make the case for either.
I don't know if the consistency and lack of AP configuration is a compelling enough argument. What are your thoughts?
from five15.
Need to resolve #15 in order to run the tests without a ton of exclusions in the karma config.
from five15.
@craigburke the way I'm reasoning about it currently is: If we see our primary audience as Grails people adopting Angular, we should do things that wouldn't surprise a Grails person. I can see that as reason enough for putting the specs in a different folder. I don't personally love it but I understand the reasoning.
We can always move stuff later if we change our minds as well.
from five15.
@VoltiSubito I set things up so that the tests are in place with the code and it looks pretty good actually. Thanks for hashing it out with me.
from five15.
👍
from five15.
Related Issues (17)
- Add Basic In Memory Auth HOT 5
- Create Initial Project Code
- Test
- Javascript Closure AP Module HOT 4
- Add JSHint to build
- Add JSCS to build
- Validate remainder of AnguarJS code against style guide HOT 6
- Stub NG service to retrieve prior reports
- Stub NG service to save reports
- Add state to create new report
- Add state to view prior report
- Send Basic Auth Request HOT 5
- Respond To Basic Auth Request
- Replace bower_components with gradle task
- Move common modules to five15.core HOT 1
- Swap out basic auth and profile service with spring-security-rest plugin
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 five15.