You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My spec uses require js to fetch its dependencies this way :
functionrequireDependencies(deps,cb){deps=Array.isArray(deps) ? deps : [deps];beforeEach(function(){vardone=false;runs(function(){require(deps,function(){cb&&cb.apply(cb,arguments);done=true;});});waitsFor(function(){returndone;});});}describe("Data",function(){requireDependencies(["components/systemConfig/model/data"],function(_Data){Data=_Data;});it("Its value can be updated",function(){expect(Data).not.toBeNull();});});
Everything works fine when I run mvn jasmine:bdd ; however when I run mvn test, the html unit runner seems to looks for the 'data.js' file under the 'target' folder ; obviously it's not there, and I get
a stack trace :
Exception class=[net.sourceforge.htmlunit.corejs.javascript.WrappedException]
com.gargoylesoftware.htmlunit.ScriptException: Wrapped java.lang.RuntimeException: java.io.FileNotFoundException: /home/phtrivier/...(redacted)../my-project/target/jasmine/src/main/resources/web/resources/components/systemConfig/model/data.js (No such file or directory)
at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:595)
at net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:537)
at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:538)
at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:545)
at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:520)
at com.gargoylesoftware.htmlunit.html.HtmlPage.executeJavaScriptFunctionIfPossible(HtmlPage.java:896)
at com.gargoylesoftware.htmlunit.javascript.background.JavaScriptFunctionJob.runJavaScript(JavaScriptFunctionJob.java:53)
at com.gargoylesoftware.htmlunit.javascript.background.JavaScriptExecutionJob.run(JavaScriptExecutionJob.java:84)
at com.gargoylesoftware.htmlunit.javascript.background.JavaScriptJobManagerImpl.runSingleJob(JavaScriptJobManagerImpl.java:313)
at com.gargoylesoftware.htmlunit.javascript.background.JavaScriptExecutor.run(JavaScriptExecutor.java:148)
at java.lang.Thread.run(Thread.java:662)
Does the RequireJs runner assumes that the sources are copied to target ? or should another dependency phase take care of it ?
Thanks
The text was updated successfully, but these errors were encountered:
Hi
I'm using the requirejs integration with the following in my pom.xml :
My spec uses require js to fetch its dependencies this way :
Everything works fine when I run mvn jasmine:bdd ; however when I run mvn test, the html unit runner seems to looks for the 'data.js' file under the 'target' folder ; obviously it's not there, and I get
a stack trace :
Does the RequireJs runner assumes that the sources are copied to target ? or should another dependency phase take care of it ?
Thanks
The text was updated successfully, but these errors were encountered: