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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T20:17:14+00:00 2026-06-17T20:17:14+00:00

Writing some helper functions to use phantomJs as our testing framework, is there any

  • 0

Writing some helper functions to use phantomJs as our testing framework, is there any way to make ‘void’ functions… or to make phantomJs ignore the return value somehow?

var mod = require('./mymod.js');
mod.doStuff();

>> TypeError: 'undefined' is not a function

For convenience sake, is there any way to accomplish this? or a good reason why i shouldn’t?

the method exists fine. it’s just a method that triggers something. So there’s nothing in the design the merits a return value for it.

if I do var ignore = mod.doStuff(); all is fine. But as I said, for convenience…

i think it tries to evaluate all statements. maybe i’m just used to the lazy parsers that ignore data types on the execution level.

  • 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-17T20:17:15+00:00Added an answer on June 17, 2026 at 8:17 pm

    It is impossible that mod.doStuff() would generate an error when var ignore=mod.doStuff(); does not. There is some other problem, which maybe could be tracked down if you’d post your entire code. Start with the basics: put a breakpoint at the line in question, and when it stops there, examine the value of mod.doStuff and make sure it’s a function, etc. etc. In order to do this with phantomJS, google for “phantomJS remote debugging”, which will tell you about the --remote-debugger-port option, so you can open a web browser to http://localhost:port and debug using standard approach.

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

Sidebar

Related Questions

I'm contemplating writing some helper functions to make it easier to do simple changes
Im writing some helper functions for a project im working on. I've always wanted
I have some PowerShell helper functions in a file. I'd like to make them
I've been writing some declarative Razor Helpers (using the @helper syntax) for use with
I am writing some helper functions to convert my R variables to JSON. I've
I have been writing some helper functions in Android 3.0's renderscript, and have come
I'm writing some helper functions that take a SqlDataReader and process the results. Now
I'm writing some html code to make an html email. I've done some research
Is there a safe way to use Qt without calling QApplication::exec()? I have a
I'm writing some utilities that I want to call as functions. They are called

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.