From 2be0a44aa8168c5ee6ebafef84eeff74b73a7b8e Mon Sep 17 00:00:00 2001 From: Michael Jerger Date: Tue, 15 Aug 2023 08:09:27 +0200 Subject: [PATCH] add js --- src/main/python/ddadevops/domain/artifact.py | 2 ++ src/test/python/domain/test_artifact.py | 3 +++ 2 files changed, 5 insertions(+) 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()