Skip to content

Commit

Permalink
fix: assert serve static file content type error
Browse files Browse the repository at this point in the history
  • Loading branch information
inhere committed Feb 21, 2022
1 parent 9627aa4 commit f5f453b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion router_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -703,7 +703,11 @@ func TestAccessStaticAssets(t *testing.T) {
if envutil.IsWin() {
is.Equal("text/plain; charset=utf-8", contentType)
} else {
is.Equal("application/javascript", contentType)
// is.Equal("application/javascript", contentType)
// fix contentType:
// go < 1.17: "application/javascript"
// go >= 1.17: text/javascript; charset=utf-8
is.Contains(contentType, "javascript")
}
}

Expand Down

0 comments on commit f5f453b

Please sign in to comment.