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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T17:13:22+00:00 2026-05-30T17:13:22+00:00

Given: client-side javascript code (runs in browser, uses jquery etc). Currently the code is

  • 0

Given: client-side javascript code (runs in browser, uses jquery etc). Currently the code is tested with Rhino and envjs. We would like to switch to node.js. However, after some research, couldn’t find any envjs-like supplementary that emulates a browser.

While running node.js “as is”, even basic capabilities like alert() or window are missing.

Is there any standard bundle, similar to Rhino & envjs for node.js please?

  • 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-05-30T17:13:23+00:00Added an answer on May 30, 2026 at 5:13 pm

    You could use zombie.js, which has everything you need for testing. Or you could leverage jsdom (which zombie.js uses internally) to get a DOM in node.js, and execute your tests against that DOM.

    I can also recommend testling, which executes tests according to your specification in all common browsers — the code is running in actual browsers against your service.

    Here’s a simple example with jsdom:

    var jsdom = require("jsdom");
    
    jsdom.env(url, ["http://code.jquery.com/jquery.min.js"], function(err, window) {
        // jQuery is at window.$
    });
    

    Instead of url above, you could have an HTML document, or fragment.

    You can also load a page and fetch any external resources, instead of providing jQuery etc directly to jsdom:

    var jsdom = require("jsdom").jsdom,
        doc = jsdom(markup),
        window = doc.createWindow();
    
    // Do your stuff on window, jsdom will have fetched all the scripts referenced in the markup
    

    Again, zombie.js uses jsdom internally and it might be a better starting point.

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

Sidebar

Related Questions

I'm using the client-side javascript version of LESS to compile out less code, and
I would like to understand how I can run client-side javascript after an update
Given the following code: using (var client = new WebClient()) { string url =
I now get the ASP.NET Ajax client-side framework failed to load. javascript error in
I am currently validating user input on server side (PHP). The client side sends
I need a mechanism for storing complex data structures created in client side javascript.
I am creating a web service which uses REST web services. The client side
We recently were given a client requirement to encrypt all their data while at
A client has given me a spreadsheet of hundreds of domain names. My task
I have been given the task of internationalizing a large client-server application. The remit

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.