add js
This commit is contained in:
parent
7d2d197cbb
commit
2be0a44aa8
2 changed files with 5 additions and 0 deletions
|
@ -22,6 +22,8 @@ class Artifact(Validateable):
|
||||||
match suffix:
|
match suffix:
|
||||||
case ".jar":
|
case ".jar":
|
||||||
return "application/x-java-archive"
|
return "application/x-java-archive"
|
||||||
|
case ".js":
|
||||||
|
return "application/x-javascript"
|
||||||
case _:
|
case _:
|
||||||
return "text/plain"
|
return "text/plain"
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,9 @@ def test_should_calculate_type():
|
||||||
sut = Artifact("x.jar")
|
sut = Artifact("x.jar")
|
||||||
assert "application/x-java-archive" == sut.type()
|
assert "application/x-java-archive" == sut.type()
|
||||||
|
|
||||||
|
sut = Artifact("x.js")
|
||||||
|
assert "application/x-javascript" == sut.type()
|
||||||
|
|
||||||
sut = Artifact("x.jar.sha256")
|
sut = Artifact("x.jar.sha256")
|
||||||
assert "text/plain" == sut.type()
|
assert "text/plain" == sut.type()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue