Skip to content

Latest commit

 

History

History
19 lines (12 loc) · 659 Bytes

getproperty_method.md

File metadata and controls

19 lines (12 loc) · 659 Bytes

$getProperty() Method

This method can help you retrieve any public or private internal state variable so you can do assertions. You can also pass in a scope argument so you can not only retrieve properties from the variables scope but from any nested structure inside of any private scope:

any $getProperty(name [scope='variables']

Parameters:

  • name - The name of the property to retrieve
  • scope - The scope where the property lives in. The default is variables scope.
expect( model.$getProperty("dataNumber", "variables") ).toBe( 4 );
expect( model.$getProperty("name", "variables.instance") ).toBe(  "Luis" );