Questions tagged [jasmine-node]

Integration of Jasmine Spec framework with Node.js

327 questions
4
votes
1 answer

Use jasmine-node to test meteor application with auto-test

I'm using jasmine-node to test my Meteor application and I want to use the auto-test feature so I don't have to rerun the tests all the time by myself. My meteor application folder structure is like this: server foo.coffee tests …
Marc
  • 6,749
  • 9
  • 47
  • 78
4
votes
1 answer

How do you force the absolute path for node modules?

I have a Titanium project which uses the CommonJS module style. However the code uses absolute paths so that when it builds the absolute path is sandboxed to the application directory. var foo = require("/lib/module"); I want to run some tests on…
Sukima
  • 9,965
  • 3
  • 46
  • 60
3
votes
1 answer

jasmine library "no specs found" when running same test twice

I want to be able to run the same test twice from a node express server, but noticed the second run of the same test always gives "no specs found". Here is an example : jasmine-test.js : function jasmineExecute(fileName) { var jasmine = new…
3
votes
3 answers

How to run jasmine-node in WebStorm IDE

I've installed nodejs and jasmine-node and it runs in command line. Configuration of WebStorm Runner: Node parameters: jasmine-node --config endpoint ServerAddress:8083 Working directory: G:\NPWorkDir\frisby JavaScript file:…
ali amiri
  • 33
  • 6
3
votes
2 answers

I am finding trouble using log4js-protractor-appender

My log4js.js file code 'use strict'; var log4js = require('log4js'); var log4jsGen = { getLogger: function getLogger() { log4js.loadAppender('file'); log4js.addAppender(log4js.appenders.file('./ApplicationLogs.log'), 'logs'); …
3
votes
0 answers

How to run jasmine-node tests in the browser (ex. using testem)?

How do I run jasmine-node(https://github.com/mhevery/jasmine-node) tests in the browser using testem(https://github.com/testem/testem)? They both run on nodeJS but I can't figure out how to combine them. I was wondering if there were any libraries…
Cookies
  • 325
  • 1
  • 4
  • 10
3
votes
1 answer

How do I spyOn private functions in a node module using jasmine-node?

app.js function _private() { console.log( '_private' ); } function public() { console.log( 'public' ); _private(); } module.exports = { public: public, _private: _private }; spec/appSpec.js describe( 'test', function() { …
ggutenberg
  • 6,880
  • 8
  • 39
  • 48
3
votes
1 answer

CircleCI : $ npm test failing

I'm trying to use CircleCI for one of my node.js application. I'm trying to learn the way circleci works. My app and test cases are running fine locally. I'm using jasmine-node for test. But when I'm trying to build my app on circleci I'm getting…
3
votes
3 answers

Jasmine false positive with {} and [] in jasmine-node

For some reason jasmine's... expect({}).toEqual([]); is reporting true (but they are different types). How do I do this check with jasmine?
Exitos
  • 29,230
  • 38
  • 123
  • 178
3
votes
2 answers

How do I properly fail an async unit test in jasmine-node

Why does the following code fail with a timeout? It looks like 'should' throws an error and done() never gets called? How do I write this test so that it fails correctly instead of having jasmine reporting a timeout? var Promise =…
user3409889
  • 187
  • 2
  • 11
3
votes
2 answers

Why is jasmine-expect not validating that an error was thrown?

I have a function that throws an error that I am testing. Here is the function: parse: function(input) { var results = {}; var that = this; input.forEach(function(dependency) { var split =…
jhamm
  • 24,124
  • 39
  • 105
  • 179
3
votes
4 answers

No output from jasmine-node

I'm new to JavaScript, Node.js and jasmine. I'm trying to run a test from the book "The Node Craftsman Book", FilesizeWatcher. I've created the package.json file and run "npm install", thus installing jasmine-node locally to the project. When I run…
blueskies
  • 33
  • 5
3
votes
1 answer

jasmin-node not working in Windows

I'm trying to run jasmine-node from Windows cmd with no success. My package.json is at the top level of my project, with the following { "devDependencies": { "jasmine-node": "" } } I run this at the top level of my project. npm…
expresso
  • 91
  • 1
  • 7
3
votes
2 answers

jasmine-node is not working on windows

I am running jasmine-node test on windows. I have following command in my package.json. "scripts": { "test": "./node_modules/.bin/jasmine-node --coffee sample_spec.coffee", } when I run npm test, I am getting following error: TypeError:…
3
votes
1 answer

jasmine-node shows error when ran from command prompt

Installed jasmine-node using this: sudo npm install jasmine-node -g It is successful and shows: /usr/bin/jasmine-node -> /usr/lib/node_modules/jasmine-node/bin/jasmine-node jasmine-node@1.14.3 /usr/lib/node_modules/jasmine-node ├──…
Mayukh Roy
  • 1,815
  • 3
  • 19
  • 31