Questions tagged [mocha]

Mocha is a feature-rich JavaScript test framework.

Filter by
Sorted by
Tagged with
1
vote
2answers
111 views

Best practice to TDD a unit of work in frontend JavaScript

Context Right now, I'm working on an overhaul of an edit page for a menu, which is quite involved in and of itself. I have identified the issue: there is literally no structure in place for when a ...
0
votes
2answers
161 views

Getting error when i run my test using mocha

I have written a code where it will launch the app,click on the login button ,enter username and password and click on sign in . when i run this using "node 'filename'" it is running fine with no ...
1
vote
1answer
30 views

How to know when “karma” test cases are run and reports are generated?

I have written unit test cases using Karma + Mocha + Chai and generated reports using karma-html-reporter. When the report got generated, I want to send the report to my team through mail. I need to ...
0
votes
2answers
1k views

Getting an error TypeError: describe is not a function

I started creating a base test case using Mocha and Selenium Webriver. I get the following error when I try and run > mocha test TypeError: describe is not a function at Object.<anonymous> ...
1
vote
0answers
77 views

Automated Testing Parallely across browsers (Selenium + Mocha )

Hi I need to write automated tests for jQuery based plugins using Selenium WebDriver and Mocha. I have 3 questions. 1.mocha test command is used to start the test. If I need to do the tests ...
3
votes
2answers
550 views

Should I use Jasmine/FrisbyJS or Mocha/Chai for testing of live API with Angular?

What I'm looking for in an answer Concrete relevant(newer?) examples of why one choice is better than the other OR, a concrete suggestion of why using a different language is the better choice over ...
1
vote
2answers
55 views

Using Chai, how can I assert the result of “git pull”

I am using Mocha and Chai.js to test a function which executes git pull in a Terminal and I want to assert that it results in Already up-to-date. How can I accomplish this? What is the best approach ...