diff --git a/src/main/python/ddadevops/domain/artifact.py b/src/main/python/ddadevops/domain/artifact.py index e6d5904..f7ae720 100644 --- a/src/main/python/ddadevops/domain/artifact.py +++ b/src/main/python/ddadevops/domain/artifact.py @@ -22,6 +22,8 @@ class Artifact(Validateable): match suffix: case ".jar": return "application/x-java-archive" + case ".js": + return "application/x-javascript" case _: return "text/plain" diff --git a/src/test/python/domain/test_artifact.py b/src/test/python/domain/test_artifact.py index e454c5c..86e5324 100644 --- a/src/test/python/domain/test_artifact.py +++ b/src/test/python/domain/test_artifact.py @@ -24,6 +24,9 @@ def test_should_calculate_type(): sut = Artifact("x.jar") assert "application/x-java-archive" == sut.type() + sut = Artifact("x.js") + assert "application/x-javascript" == sut.type() + sut = Artifact("x.jar.sha256") assert "text/plain" == sut.type()