Skip to content

Commit a06aa94

Browse files
committed
improve coverage
1 parent bc2ca4d commit a06aa94

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

tests/index.js

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ describe('rc-queue-anim', () => {
7676
this.state.items.map((item) => <div key={item.key}>{item.content}</div>) :
7777
null
7878
}
79+
{null}
7980
</QueueAnim>
8081
);
8182
},
@@ -98,9 +99,7 @@ describe('rc-queue-anim', () => {
9899
});
99100

100101
it('should render children', () => {
101-
const instance = createQueueAnimInstance({
102-
ease: 'easeInBounce',
103-
});
102+
const instance = createQueueAnimInstance();
104103
const children = TestUtils.scryRenderedDOMComponentsWithTag(instance, 'div');
105104
expect(children.length).to.be(4);
106105
});
@@ -164,7 +163,10 @@ describe('rc-queue-anim', () => {
164163

165164
it('should have duration', (done) => {
166165
const duration = 300;
167-
const instance = createQueueAnimInstance({ duration });
166+
const instance = createQueueAnimInstance({
167+
duration,
168+
ease: 'easeInBounce',
169+
});
168170
const children = TestUtils.scryRenderedDOMComponentsWithTag(instance, 'div');
169171
shouldAnimatingThisOne(instance, 0);
170172
setTimeout(() => {
@@ -178,7 +180,9 @@ describe('rc-queue-anim', () => {
178180

179181
it('should have leave animation', (done) => {
180182
const interval = defaultInterval;
181-
const instance = createQueueAnimInstance();
183+
const instance = createQueueAnimInstance({
184+
ease: 'easeInOutElastic',
185+
});
182186
setTimeout(() => {
183187
const children = TestUtils.scryRenderedDOMComponentsWithTag(instance, 'div');
184188
expect(getOpacity(children[3])).to.be(1);
@@ -196,6 +200,7 @@ describe('rc-queue-anim', () => {
196200

197201
it('should support custom animation config', (done) => {
198202
const instance = createQueueAnimInstance({
203+
ease: 'easeOutElastic',
199204
animConfig: {
200205
left: [100, 0],
201206
},
@@ -240,7 +245,9 @@ describe('rc-queue-anim', () => {
240245
});
241246

242247
it('should has animating className', (done) => {
243-
const instance = createQueueAnimInstance();
248+
const instance = createQueueAnimInstance({
249+
ease: 'easeInElastic',
250+
});
244251
setTimeout(() => {
245252
let children = TestUtils.scryRenderedDOMComponentsWithTag(instance, 'div');
246253
expect(children[1].className).to.contain('queue-anim-entering');

0 commit comments

Comments
 (0)