Comments (15)
Yes, just found out about it, when thinking about doing my own template, as I need to pass options into Require.js and example would come in handy...
from jasmine-maven-plugin.
I've been planing to document it, but been swamped the last 4 months so I haven't prioritized it I guess. Maybe it would be an idea to link to the example in the mean time? What do you think @searls?
from jasmine-maven-plugin.
I need to make Jasmine work with RequireJS by following this solution http://japhr.blogspot.co.uk/2011/12/jasmine-testing-of-requirejs-powered.html. Are those two configs safe to use?
from jasmine-maven-plugin.
I'd appreciate documentation for this too. Frankly, I never read the Require.js pull request closely enough to understand it.
@chchrist there's apparently a canned Require.js template. I've never used it / can't vouch for it, but it looks like you can set the specRunnerTemplate parameter to "REQUIRE_JS" https://github.com/searls/jasmine-maven-plugin/blob/master/src/main/java/com/github/searls/jasmine/AbstractJasmineMojo.java -- have you already tried that?
from jasmine-maven-plugin.
No I didn't know about that. I'll try to see if it works, Thnx!
from jasmine-maven-plugin.
Is there an example pom.xml to use this template? I am interested in the priority atribute
from jasmine-maven-plugin.
This is the only one I know of.
from jasmine-maven-plugin.
Grate examples, but not sufficient imo.
How does other paths relate to customRunnerConfiguration?. It seems to effect scriptLoaderPath.
I'm trying to load require.js from a path specified in scriptLoaderPath and then load a file with customRunnerConfiguration that sets the baseUrl that all my tests should use. Is this not the way to do it?
from jasmine-maven-plugin.
@baelter It's been a while since I wrote this, so my memory might be completely wrong, but I don't think the customRunnerConfig changes the baseUrl. This is the template that's used: https://github.com/searls/jasmine-maven-plugin/blob/master/src/main/resources/jasmine-templates/RequireJsSpecRunner.htmltemplate and it's interpolated with values from the customRunnerConfig which is basically just adding properties to object literal passed to require.config.
There seem to be some interested in this feature, and I'm about to start a new project that will use this feature so I hope to have some time to extend the example and finish up the documentation soon.
from jasmine-maven-plugin.
FWIW, I would find an example of the usage of customRunnerConfiguration valuable as well. @ebaxt, based on your comment it sounds like the text file should just contain name:val pairs delimited by commas to get incorporated into the require.config() properly? I will try it and see how it goes.
from jasmine-maven-plugin.
Ok, I've successfully gotten values into the require.config() via the customRunnerConfiguration! I used a text file containing the following code to set a RequireJS dependency path:
paths: {
"lib" : "target/lib/js/"
}
Now I have a new question: Can anyone think of a way that I can set the value of "lib" in the above example to be "${project.basedir}/target/lib/js/"? If I try to put ${project.basedir} in the configuration text file, it doesn't get updated with the actual value but instead is copied directly into the htmltemplate. Any ideas?
from jasmine-maven-plugin.
Glad you're making progress! A thousand apologies, but this thread is now officially well over my head. I have almost no familiarity with the changes made to customRunnerConfiguration
to support Require.js :-/
from jasmine-maven-plugin.
@JHouk try to use maven-resource-plugin filtering, http://maven.apache.org/plugins/maven-resources-plugin/examples/filter.html.
from jasmine-maven-plugin.
@ieugen Thank you! I'd been trying to figure out how to set those variables as that has been one of the last (?) big pieces I've needed to figure out about how to use Maven. That should be a huge help!
from jasmine-maven-plugin.
These have been documented here: https://github.com/searls/jasmine-maven-plugin/wiki/Spec-Runner-Templates
However please note that this documentation is for the yet to be released 1.3.0.0 version of the plugin. You can monitor the progress of that release here: https://github.com/searls/jasmine-maven-plugin/issues/milestones?direction=asc&page=1&sort=due_date
from jasmine-maven-plugin.
Related Issues (20)
- Jasmine-Maven plugin error in Windows platform HOT 1
- antlr error HOT 1
- ReferenceErrors when running in Jenkins with symlinked JENKINS_HOME HOT 3
- How to use phantomjs 2.1.1 HOT 1
- Jenkins Maven Integration with Jasmine broken since 2.2 (Test results not shown) HOT 2
- Cannot make it work with ManualSpecRunner HOT 2
- Allow users to configure tests to run in a random order HOT 2
- turnoff the default reports generated by this plugin and print only the custom reporter messages HOT 1
- Can't customize ChromeDriver on 3.0-alpha-01 HOT 2
- Update the github pages site HOT 1
- Unable to set WebDriver IE specific capability ignoreProtectedModeSettings HOT 2
- Chrome version 74 HOT 4
- The documentation page is down HOT 3
- Blocked testing with latest version HOT 11
- Cannot make it work with RemoteWebDriver and Docker HOT 5
- timeout error after waiting for 300 sec with version 3.0-beta-01 HOT 2
- jasmine:bdd (version 3.0-beta-01) opens browser but jetty gives 403 HOT 3
- Broken link for usage page HOT 2
- The link to documentation at github is broken. HOT 5
- plugin doesn't work with Chrome version 117 HOT 2
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 jasmine-maven-plugin.