<commit_before># hasAttribute(attribute, value)

Check if wrapper DOM node has attribute matching value

### Arguments

attribute (String): attribute name to assert value of.
value (String): the value attribute should hold.

### Returns

(Boolean): true if element contains attribute with matching value. False if not.

## Example

```js
import { mount } from 'avoriaz';
import Foo from './Foo.vue';

const wrapper = mount(Foo);
expect(wrapper.hasAttribute('id', 'foo')).to.equal(true);
```<commit_msg>DOC: hasAttribute method with component example<commit_after># hasAttribute(attribute, value)

Check if wrapper DOM node has attribute matching value

### Arguments

`attribute` (`String`): attribute name to assert value of.

`value` (`String`): the value attribute should hold.

### Returns

(`Boolean`): `true` if element contains attribute
with matching value, `false` otherwise.

## Example

`Foo.vue`

```js
<template lang="html">
    <div id="foo"></div>
</template>

<script>
export default {
    name: 'foo'
}
</script>
```

`Foo.spec.js`

```js
import { mount } from 'avoriaz';
import Foo from './Foo.vue';

const wrapper = mount(Foo);
expect(wrapper.hasAttribute('id', 'foo')).to.equal(true);
```
{'fraction_non_alphanumeric': 0.15066225165562913, 'fraction_numerical': 0.0, 'mean_word_length': 5.045, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6249838', 'n_tokens_mistral': 372, 'n_tokens_neox': 356, 'n_words': 130}