Skip to content

Commit e5eb83d

Browse files
committed
test: fix class order
1 parent 8ec3b9d commit e5eb83d

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

packages/runtime-dom/__tests__/modules/class.spec.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -120,24 +120,24 @@ describe('class', () => {
120120
return () => h(child2, { class: ['a', parentClass.value] })
121121
}
122122
}
123-
const aaa = h(parent)
124-
const bbb = h(parent2)
125-
console.log(aaa, bbb)
123+
124+
render(h(parent2), root)
125+
expect(root.children[0].className).toBe('c d a b')
126126

127127
render(h(parent), root)
128-
expect(root.children[0].className).toBe('c a d b')
128+
expect(root.children[0].className).toBe('c d a b')
129129

130130
parentClass.value = 'e'
131131
render(h(parent), root)
132-
expect(root.children[0].className).toBe('c a d e')
132+
expect(root.children[0].className).toBe('c d a e')
133133

134134
parentClass.value = 'f'
135135
render(h(parent), root)
136-
expect(root.children[0].className).toBe('c a f e')
136+
expect(root.children[0].className).toBe('c f a e')
137137

138138
parentClass.value = { foo: true }
139139
childClass.value = ['bar', 'baz']
140-
expect(root.children[0].className).toBe('c a bar baz foo')
140+
expect(root.children[0].className).toBe('c bar baz a foo')
141141
})
142142

143143
test('class merge between multiple nested components sharing same element', () => {

0 commit comments

Comments
 (0)