Skip to content

Commit 878cc51

Browse files
committed
Fix tests\!
1 parent 905f787 commit 878cc51

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ dist: trusty
44
addons:
55
chrome: stable
66
node_js:
7-
- "10.3.0"
7+
- "12.2.0"
88
before_install:
99
- npm install npm -g
1010
before_script:
1111
- npm install -g grunt-cli
1212
script:
13-
- grunt ci
13+
- npm run-sript ci

README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# CommentCoreLibrary 弹幕核心通用构件
22
[![NPM version](https://badge.fury.io/js/comment-core-library.svg)](http://badge.fury.io/js/comment-core-library)
33
[![Bower version](https://badge.fury.io/bo/comment-core-library.svg)](http://badge.fury.io/bo/comment-core-library)
4-
[![Built with Grunt](https://cdn.gruntjs.com/builtwith.png)](http://gruntjs.com/)
54
[![License](http://img.shields.io/badge/license-MIT-brightgreen.svg)](http://opensource.org/licenses/MIT)
65
[![Build Status: Linux](https://travis-ci.org/jabbany/CommentCoreLibrary.svg?branch=master)](https://travis-ci.org/jabbany/CommentCoreLibrary)
76
[![Coverage Status](https://img.shields.io/coveralls/jabbany/CommentCoreLibrary.svg)](https://coveralls.io/r/jabbany/CommentCoreLibrary?branch=master)
@@ -56,5 +55,3 @@ We encourage any contributions to this project, please read
5655
Also, feel free to have a look at our sister project
5756
[ABPlayerHTML5](https://github.com/jabbany/ABPlayerHTML5) for a reference
5857
implementation of a video player with CommentCoreLibrary.
59-
60-

spec/CommentCoreLibrary_spec.coffee

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ describe 'CommentManager', ->
6060
expect(manager.timeline).toEqual [c1, c2, c3, c4, c5]
6161

6262
it 'smoking test', ->
63-
sampleNormal =
63+
sampleNormal =
6464
"""
6565
<?xml version="1.0" encoding="UTF-8"?><i>
6666
<d p="15.104999542236,1,25,16777215,1388314569,0,1a87dd40,364586099">关了弹幕瞬间好多了</d>
@@ -89,14 +89,16 @@ describe 'CommentManager', ->
8989
spy = sinon.spy manager, 'send'
9090
manager.load [ c3, c4, c5 ]
9191
manager.time 3
92-
expect(spy).toHaveBeenCalledThrice()
92+
expect(spy).toHaveBeenCalledOnce()
93+
expect(spy).toHaveBeenCalledWith([ c3, c4, c5 ])
9394

9495
it 'limits based on limiter', ->
9596
spy = sinon.spy manager, 'send'
9697
manager.load [ c3, c4, c5 ]
9798
manager.options.limit = 2
9899
manager.time 3
99-
expect(spy).toHaveBeenCalledTwice()
100+
expect(spy).toHaveBeenCalledOnce()
101+
expect(spy).toHaveBeenCalledWith([ c3, c4 ])
100102

101103
it 'seeks if seek threshold is passed', ->
102104
manager.load [ c1 ]

0 commit comments

Comments
 (0)