Skip to content

Commit a7216e1

Browse files
committed
add class attr passthrough tests to FontAwesomeLayersText
1 parent f27385b commit a7216e1

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

src/components/__tests__/FontAwesomeLayersText.test.js

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,16 +93,28 @@ describe('class attr', () => {
9393
expect(wrapper.element.classList.contains('gray8')).toBe(true)
9494
})
9595

96+
test('fa-inverse is applied alongside fa-layers-text', () => {
97+
const wrapper = compileAndMount({
98+
template: '<font-awesome-layers-text value="NEW" class="fa-inverse" />',
99+
components: {
100+
FontAwesomeLayersText
101+
}
102+
})
103+
104+
expect(wrapper.element.classList.contains('fa-layers-text')).toBe(true)
105+
expect(wrapper.element.classList.contains('fa-inverse')).toBe(true)
106+
})
107+
96108
test('user-provided class does not replace fa-layers-counter', () => {
97109
const wrapper = compileAndMount({
98-
template: '<font-awesome-layers-text :value="42" :counter="true" class="my-counter" />',
110+
template: '<font-awesome-layers-text :value="42" :counter="true" class="fa-inverse" />',
99111
components: {
100112
FontAwesomeLayersText
101113
}
102114
})
103115

104116
expect(wrapper.element.classList.contains('fa-layers-counter')).toBe(true)
105-
expect(wrapper.element.classList.contains('my-counter')).toBe(true)
117+
expect(wrapper.element.classList.contains('fa-inverse')).toBe(true)
106118
})
107119
})
108120

0 commit comments

Comments
 (0)