guardian / sbt-jasmine-plugin

An SBT plugin for running jasmine tests in your build.
23 stars 28 forks source link

LoadError in tests #19

Closed fntz closed 9 years ago

fntz commented 9 years ago

Hi.

I have a next configuration for project

appJsDir <+= sourceDirectory { src => src / "main" / "webapp" / "javascripts"  },
appJsLibDir <+= sourceDirectory { src => src / "main" / "webapp" / "javascripts" },
jasmineTestDir <+= sourceDirectory { src => src / "test" / "webapp" / "javascripts" },
jasmineConfFile <+= sourceDirectory { src => src / "test" / "webapp" / "javascripts" / "test.dependencies.js" },

javascript sources in project/module/src/main/webapp/javascripts/vendor/angular,jquery... tests in project/module/src/test/webapp/javascripts/

and in test dir i have a test.dependencies.js file with content

EnvJasmine.loadGlobal(EnvJasmine.libDor + "vendor/angular.min.js");
EnvJasmine.loadGlobal(EnvJasmine.libDir + "vendor/angular-route.js");
EnvJasmine.loadGlobal(EnvJasmine.libDir + "vendor/angular-ui.js");
EnvJasmine.loadGlobal(EnvJasmine.libDir + "vendor/jquery-2.1.1.min.js");

when i run tests, i get

Could not read file: /home/user/app/project/module/src/main/webapp/javascripts/vendor/angular.min.js
 error was: TypeError: Cannot find function querySelector in object [object HTMLDocument].
Could not read file: /home/user/app/project/module/src/main/webapp/javascripts/vendor/angular-ui.js
 error was: JavaException: java.io.FileNotFoundException: /home/user/app/project/module/src/main/webapp/javascripts/vendor/angular-ui.js (file not found)
Could not read file: /home/user/app/project/module/src/test/webapp/javascripts/test.dependencies.js
 error was: TypeError: Cannot call method "close" of undefined
running spec:/home/user/app/project/module/src/test/webapp/javascripts/specs/loginform.spec.js
running the jasmine tests

but my files exists, why i got this errors?

theefer commented 9 years ago

Sorry, this plugin is no longer maintained, as per the README.

I recommend using the sbt-grunt-plugin instead, if using Grunt, or if you use play you could try sbt-web.

fntz commented 9 years ago

ok thanks