Expected ({0: HTMLNode, length: 1}) to be '#container'.

describe("Experimentation", function() { var elem; beforeEach(function() { elem = $('<div id="container"><p>Hello World</p></div>'); }) it("allows us to search with CSS selectors", function() { expect(elem).toBe('#container'); }) }); 
  • Checked your code on tryjasmine.com everything works. The test does not pass if the container id is not container and passes if it is - Vasily Barbashev
  • I also included jquery lib. The problem can be from some libraries? - Narine Grigoryan
  • Well, without jquery, the $() record will not work for you. So the test will already fall due to undefined . Everything should work. Can you use the old version of Jasmine? Because on the test everything works - Vasily Barbashev
  • I have 2.4.1 latest version. But the jquery.js file I copied from GitHub. - Narine Grigoryan
  • Well, I have little information. Something you are doing wrong) Try to repeat everything over the off instructions of jasmine . Ps. копирование , not капирование - Vasily Barbashev

0