MCPcopy Create free account
hub / github.com/NativeScript/NativeScript / assertAttribute

Function assertAttribute

apps/automated/src/debugger/dom-node-tests.ts:98–102  ·  view source on GitHub ↗
(domNode: DOMNode, name: string, value: any)

Source from the content-addressed store, hash-verified

96}
97
98function assertAttribute(domNode: DOMNode, name: string, value: any) {
99 const propIdx = domNode.attributes.indexOf(name);
100 assert(propIdx >= 0, `Attribute ${name} not found`);
101 assertEqual(domNode.attributes[propIdx + 1], value);
102}
103
104export function test_custom_attribute_is_reported_in_dom_node() {
105 const btn = new Button();

Calls 3

assertFunction · 0.90
assertEqualFunction · 0.90
indexOfMethod · 0.80

Tested by

no test coverage detected