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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T23:39:39+00:00 2026-06-02T23:39:39+00:00

Using chrome development tools. when I instantiate a view in the app I get

  • 0

Using chrome development tools. when I instantiate a view in the app I get this…

new job.SearchView
SearchView
  $el: jQuery.fn.jQuery.init[1]
  cid: "view8"
  el: HTMLDivElement
  mbti: function (){ return fn.apply(me, arguments); }
  options: Object
  __proto__: ctor

From with jasmine I get the following (and spec failure)

new job.SearchView
SearchView
  $el: jQuery.fn.jQuery.init[0]
  cid: "view17"
  el: undefined
  mbti: function (){ return fn.apply(me, arguments); }
  options: Object
  __proto__: ctor

Why would el: be undefined when instantiating in jasmine?

SearchView defined like this…

jQuery ->
  class SearchView extends Backbone.View
    el: '#search'
    template: JST['resume']
    <snip>
  @job = if window.job then window.job else {}
  @job.SearchView = SearchView

and the spec like this…

describe 'Search View', ->
  it 'should be defined', ->
    expect(job.SearchView).toBeDefined()
  beforeEach ->
    @view = new job.SearchView()
  describe 'render', ->
    it 'should render the task', ->
      $el = @view.render().$el
      expect($el).toBeDefined()
  • 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-02T23:39:40+00:00Added an answer on June 2, 2026 at 11:39 pm

    When you specify the el attribute in your view, this acts as a container. In your app #search exists in the DOM. In the jasmine test it doesn’t.

    You can create sandboxed containers using jasmine-jquery and use them when constructing your views in tests.

    `

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

Sidebar

Related Questions

By using the Chrome Development Tools, I found out arrays and objects were being
Note: I'm using Google Chrome Currently I have this test page http://www.evecakes.com/doodles/canvas_size_issue.htm It should
When debugging browser-based apps using Google Chrome's Developer Tools, is there a way to
Sup guys. I'm loading data into a table using ajax and jquery. This can
I have a Rails 3 app and just noticed that when using Chrome (on
This is my experimental site using MathJax . I browse it using Chrome, Firefox,
I've been using jQuery UI autocomplete and it works perfectly in the development side.
I am finding myself doing more and more development using jQuery/Ajax/Javascript/JSON these days to
I'm using Chrome's Web Developer extension, but there is this block of text I'd
I'm using webrick to run my rails app in development mode. The page includes

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.