title: jasmine unit testing - testing for an undefined property of an object
body: <p>I have the following statement</p>
  
  <pre><code>expect(A.["BAR"].name).toEqual("foo"); 
  </code></pre>
  
  <p>which due to the fact my object A has the top level property "BAR" and bar has the value "foo" passes.</p>
  
  <p>I'd like to test my structure to confirm a property "NONEXISTINGPROP" has not be defined.
  e.g.</p>
  
  <pre><code>expect(A.["NONEXISTINGPROP"].name).not.toBeDefined(); 
  </code></pre>
  
  <p>However I seem to get </p>
  
  <pre><code>  "TypeError: A.[NONEXISTINGPROP] is undefined" 
  </code></pre>
  
  <p>in the jasmine test runner this is exactly what I want to confirm. Any idea why Jasmine is crying. I was hoping for it to pass this.</p>
  
  <p>Thanks SO</p>