6ev4uk / js-test-driver

Automatically exported from code.google.com/p/js-test-driver
0 stars 0 forks source link

Test RequireJS modules with Jasmine through the JsTestDriver #326

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
As a Javascript developer, I would like to test my RequireJS modules with the 
Jasmine library, in order to use the advantages of all tools with the 
JsTestDriver.

It would be nice if the config file would consist just out of something like 
this:

  - src/jasmine/lib/jasmine.js
  - src/jasmine/adapter/JasmineAdapter.js
  - js/libs/require.js
  - js/main.js
  - src/jasmine/specs/*.spec.js

Original issue reported on code.google.com by bungart1...@googlemail.com on 12 Jan 2012 at 1:33

GoogleCodeExporter commented 8 years ago
I'm stuck with running JsTestDriver with JsTestDriver framework to test my code 
written in RequireJS modules.
Could you tell me how to achieve this even with bad config file.

Thanks in advance, I will highly appreciate your help.

Original comment by vprisivko on 22 Feb 2012 at 5:57

GoogleCodeExporter commented 8 years ago
Hi,

You can load your modules with require.js and test them with 
Jasmine+JsTestDriver if you :
 - load your modules before the spec files
 - wrap you spec files into modules

I've created a github repo to showcase a whole testing environment for 
require.js modules: https://github.com/podefr/jasmine-reqjs-jstd

Olivier

Original comment by pode...@gmail.com on 28 Mar 2012 at 11:20