Karma can not recognize 'require' statement in JSFileSpec.js file. Running karma.conf.js:  (function() {     describe("DummyEmitter creation", function(){         return it("creation", function(){             var DummyEmitte...
I learned that this way is the best way to loop through the it() in a describe(), but it failed on me with "spec not found", and seems stop right before the for loop function, I wonder where did I do wrong?  Thanks!  describe('this is my...
I am writing protractor test suites, and need to test something that is uses pages generated from another suite. I can only figure out one way to write the test, but it doesn't seem like a good way to write it:   var someStuffToSave = [];  descri...
I have NodeJS project with jasmine specs . I want to run pre-requisites before running all specs in the suite for creating pre-requisite test data for the complete suite.   For individual spec , it can be done using beforeAll method, but I want to ru...
I'm using jasmine-node to test my server. I want to fake/bypass some validation related code in my user class. So I would set up a spy like this -  var user = {   email: '[email protected]',   password: 'password' }  spyOn(User, ...
I'm trying to write a jasmine test that has a spy which .and.returnValues a list of promises. The first several promises are rejections, the last is a success. While the test passes just fine, Node complains with the following:  UnhandledPromiseR...
Recently I am trying to use jasmine-node to run unit test from console.  The problem is that my unit test test.js file is in another directory of the source source.js file.  How do I make sure my unit test test.js file can refer to the method of the...
I am using jasmine/protractor to run test suites against multiple sites that my company manages.  (The sites are order form/checkout sites)  Currently, I have a separate test suite set up for each site that uses functions I've created and stored...
I'm writing Jasmine tests for an app I'm building with Node.js and Express. One of the first tests is to see if the app responds with a statusCode of 200. I was working through this tutorial which shows you how to do just that, but I've h...
I have a file runspecs.js that initializes some global objects like the window and document  //fake browser window & document jsdom = require("jsdom"); global.document = jsdom.jsdom("<html><body></body></html>&...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.