Skip to content

Commit 5e2c1c4

Browse files
committed
Add test adding undefined to class
1 parent 472330e commit 5e2c1c4

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

test/CSSTransition-test.js

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,29 @@ describe('CSSTransition', () => {
165165
<div />
166166
</CSSTransition>
167167
)
168-
})
168+
});
169+
170+
it('should not add undefined when appearDone is not defined', done => {
171+
mount(
172+
<CSSTransition
173+
timeout={10}
174+
classNames={{ appear: 'appear-test' }}
175+
in={true}
176+
appear={true}
177+
onEnter={(node, isAppearing) => {
178+
expect(isAppearing).toEqual(true);
179+
expect(node.className).toEqual('appear-test');
180+
}}
181+
onEntered={(node, isAppearing) => {
182+
expect(isAppearing).toEqual(true);
183+
expect(node.className).toEqual('');
184+
done();
185+
}}
186+
>
187+
<div/>
188+
</CSSTransition>
189+
);
190+
});
169191

170192
it('should not be appearing in normal enter mode', done => {
171193
let count = 0;

0 commit comments

Comments
 (0)