Questions tagged [mocha]

Mocha is a feature-rich JavaScript test framework.

Filter by
Sorted by
Tagged with
3
votes
2answers
730 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 ...
3
votes
2answers
246 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 ...
2
votes
1answer
115 views

Cypress + mochawesome-report undefined in consol

I have simple test to test mochawesome-report when I run it in terminal I have "undefined" multiple times during tests. How to remove it? undefined Sample test √ Passed 1) Failing ...
1
vote
1answer
34 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 ...
1
vote
2answers
60 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 ...
1
vote
0answers
83 views

Automated Testing Parallely across browsers (Selenium + Mocha )

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 parallelly ...
0
votes
1answer
70 views

How to generate Excel test report from Appium with mocha chai?

I would like to generate a simple test report in Excel. My automation is using Appium with chai mocha, and successfully reports the results of my 2 test cases to the command line. How can I send ...
0
votes
3answers
3k 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> ...
0
votes
2answers
455 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 issue....
-1
votes
1answer
16 views

What are some simple eslint defaults that can help improve app code and test code quality?

I use mocha/chai and my .eslint file is in YAML. What eslint settings could I apply to most projects, i.e. use as a template ?