Merge branch 'master' of https://github.com/gin-contrib/sse
This commit is contained in:
+16
-5
@@ -1,15 +1,26 @@
|
|||||||
language: go
|
language: go
|
||||||
sudo: false
|
sudo: false
|
||||||
go:
|
go:
|
||||||
- 1.6.4
|
- 1.8.x
|
||||||
- 1.7.4
|
- 1.9.x
|
||||||
- tip
|
- 1.10.x
|
||||||
|
- 1.11.x
|
||||||
|
- 1.12.x
|
||||||
|
- master
|
||||||
|
|
||||||
git:
|
git:
|
||||||
depth: 3
|
depth: 10
|
||||||
|
|
||||||
|
matrix:
|
||||||
|
fast_finish: true
|
||||||
|
include:
|
||||||
|
- go: 1.11.x
|
||||||
|
env: GO111MODULE=on
|
||||||
|
- go: 1.12.x
|
||||||
|
env: GO111MODULE=on
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- go test -v -covermode=count -coverprofile=coverage.out
|
- go test -v -covermode=count -coverprofile=coverage.out
|
||||||
|
|
||||||
after_success:
|
after_success:
|
||||||
- bash <(curl -s https://codecov.io/bash)
|
- bash <(curl -s https://codecov.io/bash)
|
||||||
|
|||||||
+4
-2
@@ -28,7 +28,8 @@ data:id:fake
|
|||||||
`)
|
`)
|
||||||
|
|
||||||
decoded, _ := Decode(w)
|
decoded, _ := Decode(w)
|
||||||
assert.Equal(t, decoded, []Event{event})
|
assert.Equal(t, "message", decoded[0].Event)
|
||||||
|
assert.Equal(t, decoded[0].Data, []Event{event}[0].Data)
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestEncodeWithEvent(t *testing.T) {
|
func TestEncodeWithEvent(t *testing.T) {
|
||||||
@@ -49,7 +50,8 @@ data:id:fake
|
|||||||
`)
|
`)
|
||||||
|
|
||||||
decoded, _ := Decode(w)
|
decoded, _ := Decode(w)
|
||||||
assert.Equal(t, decoded, []Event{event})
|
assert.Equal(t, "t\\n:<>\\r\test", decoded[0].Event)
|
||||||
|
assert.Equal(t, decoded[0].Data, []Event{event}[0].Data)
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestEncodeWithId(t *testing.T) {
|
func TestEncodeWithId(t *testing.T) {
|
||||||
|
|||||||
Reference in New Issue
Block a user