0

I am new to automated testing using jasmine / jasmine-node/ web driver setup. This question is related to jasmine-node module of jasmine. I have created the simple modules in node as follows

exports.testFunc = function() { console.log("Inside Test Function") }

I imported file with above content and named testCase.js in other file.

var testModule = require('./testCase.js');
testModule.testFunc();

I saved this file using as firstSpec.js and ran it with node

node firstSpec.js

It working fine. But when I run the same code with jasmine-node command it does not run

jasmine-node firstSpec.js

It runs and finish with following status

Finished in 0 seconds
0 tests, 0 assertions, 0 failures, 0 skipped

Is there is any problem in my understanding of jasmine-node module? Basically I want to write the module based test cases in different files and include it in parent spec file so that code remain structured for test cases. We can run multiple specs files. But order of execution of code for these files is important. Is there any way / work-around for this?

Thanks in advance

Manish

MANISH ZOPE
  • 1,181
  • 1
  • 11
  • 28

1 Answers1

0

I believe that your code has to be inside describe()...it() blocks or else Jasmine won't recognize it as a test. That would explain why Node ran it okay, but Jasmine did not.