jasmine-node Questions
2
Solved
While trying to figure out how to make certain jasmine expect statements dependent on a previous expect statement I discovered that previous to Jasmine 2.3.0, there was not a way. (see Stop jasmine...
Imperialism asked 19/5, 2016 at 21:12
3
Solved
When running jasmine it only presents dot(.) for successful tests, and only verbose if the test fails.
//test.spec.js
describe('jasmine', ()=>{
it('should show this text', () =>{
});
})
My...
Pointing asked 11/11, 2017 at 1:5
4
As the title says, I would like to run a single test, not the whole spec. The naive way I tried was using a case like this:
describe("MyCase",function() {
it("has a test",function() {
expect(som...
Greerson asked 28/9, 2014 at 5:35
3
Solved
How can I properly run jasmine tests using jasmine-node and RequireJS?
I already tried something like this, but doesnt work (CoffeeScript):
requirejs = require 'requirejs'
requirejs.config { base...
Skiver asked 28/11, 2012 at 8:43
4
Solved
How do I run Jasmine tests on Node.js from command line? I have installed jasmine-node via npm and written some tests. I want to run tests inside the spec directory and get results in the terminal,...
Morgen asked 27/1, 2014 at 21:46
1
I have a Node.js application that has a main-process.js and a child-process.js.
The main-process.js looks like this:
var childProcess = require('child_process');
var job = childProcess.spawn('nod...
Hunnicutt asked 23/1, 2015 at 12:43
7
Karma can not recognize 'require' statement in JSFileSpec.js file. Running karma.conf.js:
(function() {
describe("DummyEmitter creation", function(){
return it("creation", function(){
var Dummy...
Quadrivalent asked 1/10, 2013 at 13:10
1
I'm writing tests on my server side code which is in nodejs. The tests are written in jasmine 2. I'm running the tests using grunt-jasmine-nodejs.
The server side code uses the timers like setInte...
Outpour asked 26/4, 2016 at 15:39
4
Solved
I have the following test code that is being ran by jasmine-node in a file called bob_test.spec.js
require('./bob');
describe("Bob", function() {
var bob = new Bob();
it("stating something", f...
Strafe asked 2/8, 2013 at 14:59
2
I'm trying to use the methods beforeAll and afterAll of jasmine, to create a suite of tests with frisby.js, because actually, frisby doesn't have a support for this methods. So, this is what I'm tr...
Leaving asked 21/8, 2015 at 13:16
1
Solved
const Client = require('./src/http/client');
module.exports.handler = () => {
const client = new Client();
const locationId = client.getLocationId(123);
};
How can I test this module assert...
Sunwise asked 7/7, 2017 at 13:3
4
Solved
I expect this to say "1 test", but it says "0 tests". Any idea why? This is on OS X.
$ jasmine-node --verbose my.spec.js
undefined
Finished in 0.001 seconds
0 tests, 0 assertions, 0 failures, 0 s...
Unfolded asked 10/8, 2013 at 14:32
2
Solved
I am trying to set up jasmine testing of my express server. I am spinning up a new server with each spec and trying to shut it down after each spec completes. Unfortunately, the server doesn't seem...
Evidentiary asked 22/4, 2014 at 21:7
1
I'm testing the controller logic behind API endpoints in my node server with jasmine-node. Here is what this controller logic typically looks like:
var getSummary = function(req, res) {
var playe...
Trustless asked 1/10, 2016 at 17:59
2
Solved
I have globally installed jasmine by running npm install jasmine -g.
Running jasmine -v gives me
jasmine v2.5.0
jasmine-core v2.5.0
I have then, as per the docs, run
jasmine init
jasmine examp...
Wingback asked 1/9, 2016 at 13:21
1
In my MEAN project directory, I am trying to run Jasmine unit tests on my express controller. I was initially running node-jasmine however for added functionality I am changing to Jasmine 2.4. Howe...
Gadolinium asked 24/3, 2016 at 19:30
1
Solved
My application uses a service that returns a promise that is typically dependant on a whole bunch of other promises. I've refactored this into seperate named functions to make testing (and readabil...
Cecrops asked 16/5, 2016 at 2:6
1
Solved
I can run my specs with either jasmine-node or just jasmine. They both run my specs. So, what value does jasmine-node add? The readme says:
This node.js module makes the wonderful Pivotal Lab's ...
Kilauea asked 17/11, 2015 at 21:1
1
Solved
I am having issues writing unit test for the following setup as a jira.js file (in a node.js module):
var rest = require('restler'); // https://www.npmjs.com/package/restler
module.exports = func...
Obviate asked 18/11, 2015 at 5:22
4
I'm using jasmine-node to test my API, and it has worked great for my GET routes. Now, however, I need to test some POSTs and I'm not sure how to go about this without changing my database.
One th...
Gwendolin asked 22/7, 2015 at 16:10
1
Solved
I'm using the latest istanbul + jasmine-node to write all my test scripts.
In a few places I have a Readable stream that may emit error event, and I have no idea how to simulate such event in a te...
Cloudland asked 18/10, 2015 at 5:31
5
Solved
I set up grunt to run node.js jasmine tests. For some reason, with this config, the results always show double the tests.
Here is my config:
I'm using jasmine-node which plugs into grunt.
/spec/...
Philoprogenitive asked 8/5, 2015 at 7:16
1
Solved
I am building an API with expressjs and my routes look like this
module.exports = function(app){
var book = require('../controllers/book.controller');
app.get('/api/books', book.getBooks); //get ...
Ralf asked 7/5, 2015 at 19:15
2
Solved
i'm using jasmine-reporters to generate a report after protractor finish the tests,
this is my configuration file:
onPrepare: function(){
var jasmineReporters = require('jasmine-reporters');
v...
Modernity asked 10/8, 2014 at 12:10
2
Solved
Have been trying a simple async test. Installed jasmine-node npm install -g jasmine-node then wrote a simple module and test.
Simple module.
// weather.js
exports.get = function(city, callback) {...
Unshod asked 30/3, 2015 at 14:30
1 Next >
© 2022 - 2024 — McMap. All rights reserved.