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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T11:03:50+00:00 2026-06-14T11:03:50+00:00

I have an issue with testing my application with both jasmine-node and mocha (with

  • 0

I have an issue with testing my application with both jasmine-node and mocha (with zombie). The point is angular doesn’t work with this test environment – when browser.visit "http://localhost:3000/" it displays only layout, and don’t render any templates link. I guess javascript doesn’t run in browser (I mean zombie object) at all. My test Is there any way to make it works? Or problem is different?

In jasmine spec that i copied from another project spec occures an error:

/home/alder/Node/angular-express-coffee/spec/app_spec.coffee:12
        throw error;
              ^
ReferenceError: angular is not defined
    at /js/services.js:4:3
    at /js/services.js:6:4
    in /js/services.js

So I guess javascript doesn’t work too.

Update:
I add debug option and here what it displays:

➜  angular-express-coffee git:(master) ✗ mocha --require should --compilers coffee:coffee-script --colors  -R spec --ui bdd


  Given I am a new user
    When I visit the home page
Zombie: GET http://localhost:3000/newPost => 200
Zombie: GET http://localhost:3000/ => 200
Zombie: GET http://localhost:3000/js/lib/jquery-1.7.2.min.js => 200
Zombie: GET http://localhost:3000/js/lib/bootstrap.min.js => 200
Zombie: GET http://localhost:3000/js/lib/angular.min.js => 200
Zombie: GET http://localhost:3000/js/app.js => 200
Zombie: GET http://localhost:3000/js/controllers.js => 200
Zombie: Unexpected token ILLEGAL SyntaxError: Unexpected token ILLEGAL
    in /js/controllers.js
Zombie: GET http://localhost:3000/js/lib/jquery-1.7.2.min.js => 200
Zombie: Unexpected token ILLEGAL SyntaxError: Unexpected token ILLEGAL
    in /js/lib/jquery-1.7.2.min.js
Zombie: GET http://localhost:3000/js/filters.js => 200
Zombie: GET http://localhost:3000/js/directives.js => 200
Zombie: Unexpected token ILLEGAL SyntaxError: Unexpected token ILLEGAL
    in /js/directives.js
Zombie: Unexpected token ILLEGAL SyntaxError: Unexpected token ILLEGAL
    in /js/filters.js
Zombie: GET http://localhost:3000/js/lib/bootstrap.min.js => 200
Zombie: Unexpected token ILLEGAL SyntaxError: Unexpected token ILLEGAL
    in /js/lib/bootstrap.min.js
Zombie: GET http://localhost:3000/js/lib/angular.min.js => 200
Zombie: Unexpected token ILLEGAL SyntaxError: Unexpected token ILLEGAL
    in /js/lib/angular.min.js
Zombie: GET http://localhost:3000/js/services.js => 200
Zombie: GET http://localhost:3000/js/filters.js => 200
Zombie: GET http://localhost:3000/js/directives.js => 200
Zombie: GET http://localhost:3000/js/controllers.js => 200
Zombie: GET http://localhost:3000/js/app.js => 200
Zombie: Unexpected token ILLEGAL SyntaxError: Unexpected token ILLEGAL
    in /js/app.js
Zombie: Unexpected token ILLEGAL SyntaxError: Unexpected token ILLEGAL
    in /js/controllers.js
Zombie: Unexpected token ILLEGAL SyntaxError: Unexpected token ILLEGAL
    in /js/directives.js
Zombie: Unexpected token ILLEGAL SyntaxError: Unexpected token ILLEGAL
    in /js/filters.js
Zombie: GET http://localhost:3000/js/services.js => 200

Perhaps the problem in coffeescript but i had add option to mocha. And is there any method to test angular apps without JsTestDriver propagated by Angular team.

Updated.
I had changed errors assertions to browser.errors.should.be.empty and it had shown me an error:

1) Given I am a new user When I visit the home page Then browser status shold be ok:
AssertionError: expected [ [Error: Unexpected token ILLEGAL],
  [Error: Unexpected token ILLEGAL],
  [Error: Unexpected token ILLEGAL],
  [Error: Unexpected token ILLEGAL],
  [Error: Unexpected token ILLEGAL],
  [Error: Unexpected token ILLEGAL],
  [Error: Unexpected token ILLEGAL],
  [Error: angular is not defined] ] to be empty
  at Object.empty (/home/alder/Node/angular-express-coffee/node_modules/should/lib/should.js:229:10)
  at Context.<anonymous> (/home/alder/Node/angular-express-coffee/test/app_test.coffee:31:40)
  at Test.Runnable.run (/usr/lib/node_modules/mocha/lib/runnable.js:184:32)
  at Runner.runTest (/usr/lib/node_modules/mocha/lib/runner.js:300:10)
  at Runner.runTests.next (/usr/lib/node_modules/mocha/lib/runner.js:346:12)
  at next (/usr/lib/node_modules/mocha/lib/runner.js:228:14)
  at Runner.hooks (/usr/lib/node_modules/mocha/lib/runner.js:237:7)
  at next (/usr/lib/node_modules/mocha/lib/runner.js:185:23)
  at Runner.hook (/usr/lib/node_modules/mocha/lib/runner.js:205:5)
  at process.startup.processNextTick.process._tickCallback (node.js:244:9)

Last update:
The problem was in assets pipeline, all js was disabled for Zombie browser. Now I change to js from coffee and it works. But I prefer coffee, So if anyone can solve it, i’ll be grateful.

  • 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-14T11:03:51+00:00Added an answer on June 14, 2026 at 11:03 am

    Have you tried the Angular Scenario Runner?

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

Sidebar

Related Questions

I'm testing my REST API and the issue i have is that i create
I have issue that is reproduced on g++. VC++ doesn't meet any problems. So
I have an issue with a Windows Forms application that I am creating. The
I have Zend_Soap_Server. It should be tested. One issue - unit testing and development
I've a very stange issue testing my application build with xcode. I start the
I have an issue with testing routes using the MVCContrib Fluent route testing. The
I am testing my application and I am running into an issue and I'm
I have a similar problem to this issue: Merging 2 pdf with Zend Framework
I have issue with: <form:checkboxes path=roles cssClass=checkbox items=${roleSelections} /> If previous line is used
We are new to ROR, We have issue in creating Login/Logout process in ROR

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.