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 8342711
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T05:50:57+00:00 2026-06-09T05:50:57+00:00

Can someone give me some hints about how to combine bumblebee with requireJs ?

  • 0

Can someone give me some hints about how to combine bumblebee with requireJs? BumbleBee combines Rhino, JSpec, Envjs and Ant to provide an “out of the box” JavaScript testing toolkit.
Its very usefull for us because it makes a simple stand-alone-running possible in terminal on ubuntu-boxes.

Our whole JS-code based on requireJs-Modules, and it seems, that required modules are not loaded if they wehre required out of spec-files from envjs/bumblebee/rhine (what kind of stuff ever may be responsible for that), may be due to the fact of asynchronousity in requireJs.

What i’ve done:

  1. i set up a BumbleBee-Environment following instructions on the github-site mentioned above
  2. The command “ant examples” works fine and both test cases are running successfully
  3. i added require-jquery.js to the dependencies (replacing jquery.js which was initially setup) (this way follows the Tutorial “How to use jQuery with requireJS” – which runs successfully along our whole web application (and works fine)
  4. i wrote some requireJS-Modules, required them in spec-files, and detected very quickly that they will not be loaded (the spec-files will be loaded, and the require-method will be executed, but not ins content)
  5. then i played around with these setup-hints for combining requireJS with Node (rhino is mentioned here also)

These files could be interesting:

lib/bumblebee.js (which i considered as the entrypoint of the whole test-suite):

load('dependencies/js/env.rhino.1.2.js');
window.location="examples/fixture/fixture.html";

load('dependencies/js/jspec/jspec.js');
load('dependencies/js/require-jquery.js');

var runSpec = function(spec) {
    JSpec.exec(spec);
};


define(function(require) {
    console.log("A1");
    var dep = require('dependency');

    //The value returned from the function is
    //used as the module export visible to Node.
    return function () {};
});

require(['dependency'], function(d){
    console.log("A2");
} );


console.log("A3");

var specs = arguments;


jQuery.each(specs, function(index, spec) {
    runSpec(spec);
});

JSpec
  .run({ reporter: JSpec.reporters.Terminal, fixturePath: 'spec/fixtures' })
  .report();

Only “A3” will be printed to console, require-based Code will never be executed here.

Tthen I put the define/require-parts into the spec-files from the example-files and detected also, that i cant use modules with require because that they will not loaded and are not pressent.

Considering the original spec-file from BambleBee-Examples:

describe('Greeter', function() {

    load('examples/src/greeter.js');

    it('greets people', function() {
      expect(example.greeter().greet()).to(eql, 'Hello!');
    });
});

When I now use requireJS-specific modules, they will also not be loaded:

describe('Greeter', function() {

    load('examples/src/greeter.js');

    require(['dependency'], function(d){
        // do something with D...
        console.log("This will **NEVER** be printed");
    } );

    console.log("This **WILL** be printed");
    it('greets people', function() {
      expect(example.greeter().greet()).to(eql, 'Hello!');
    });
});

The Question:

Is there a way to combine Envjs with requireJS or is EnvJS the wrong testing tool for us?
Thanks a lot for any hints!

  • 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-09T05:50:58+00:00Added an answer on June 9, 2026 at 5:50 am

    This is a known issue. You can refer to https://github.com/envjs/env-js/issues/7 to get detailed discussion between envjs and requirejs.
    My solution is to use Phantomjs to run jasmine specs with CI, and you can find the sample project at https://github.com/xiaocong/xiaocong.github.com/tree/master/examples/coffee-bbb-amd-backbone-rest-contacts

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can someone give me some info/background info on how I might go about writing
Can someone give some hints of how to delete the last n lines from
Can someone give me some advice on this? I am reading in an old
Can someone give me some code to set the cell of an excel spreadsheet
I'm having trouble groking something in Linq - maybe someone can give me some
Please can some one give an example describing cascading as meant in CSS and
Can someone give me a Powershell script that will change the format of all
Can someone give me a birds eye view of backbone, nodejs etc. How do
Can someone give me an example of how I would delete a row in
Can someone give me a real-world scenario of a method/function with a string argument

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.