Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8390305
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T18:56:54+00:00 2026-06-09T18:56:54+00:00

When trying to use Mocha ( version 1.3.2 ) in the browser, along the

  • 0

When trying to use Mocha (version 1.3.2) in the browser, along the lines of the given example, I get the following exception when trying to specify acceptable globals in the expected way (i.e. with something like mocha.globals(['amplify', '_'])):

Uncaught TypeError: Object function Mocha(options) {
  options = options || {};
  this.files = [];
  this.options = options;
  this.grep(options.grep);
  this.suite = new exports.Suite('', new exports.Context);
  this.ui(options.ui);
  this.reporter(options.reporter);
  if (options.timeout) this.suite.timeout(options.timeout);
} has no method 'globals' 

This is exhibited in Chrome 21.0.1180.

One may reproduce this by going to the given example link, and in the browser console run mocha.globals(['123']).

I would expect mocha.globals to work as the linked example suggests, or there to be some documentation about an alternative, but I have found none.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T18:56:55+00:00Added an answer on June 9, 2026 at 6:56 pm

    This is issue #42 on visionmedia/mocha GitHub. The solution is, in Coffeescript:

    mocha.setup
      ui: 'bdd'
      globals: [ 'jade' ]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

trying to use hibernate with my web app and getting following exception: Initial SessionFactory
I'm trying use mod_rewrite to rewrite URLs from the following: http://www.site.com/one-two-file.php to http://www.site.com/one/two/file.php The
I am trying to specify in my RSpec tests that my controller should use
Hey, I am trying to use Mocha and Rspec to test a scenario where
I'm trying to use mocha outside of unit tests to mock an Net::HTTPResponse object.
I am trying use the django ORM to get a list by year of
I revieving the following error when trying use mysql_real_escape() function Fatal error: Call to
I am trying use TinyMCE to get code syntax to be displayed in the
I am trying use Google Maps for my work; I have downloaded an example
I am trying use this example http://www.sajithmr.me/jrecorder/example2.html for recording audio and send it to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.