From 79e6476a05b3fefcba63fd83c726d2705c72efe6 Mon Sep 17 00:00:00 2001 From: mino <66459715+stealmh@users.noreply.github.com> Date: Mon, 14 Oct 2024 17:42:36 +0900 Subject: [PATCH] =?UTF-8?q?[feat]=20#144=20Tuist=20Test=20Template=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Tuist/Templates/test/InfoPlist.stencil | 8 ++++++++ Tuist/Templates/test/Test.stencil | 10 ++++++++++ Tuist/Templates/test/test.swift | 27 ++++++++++++++++++++++++++ 3 files changed, 45 insertions(+) create mode 100644 Tuist/Templates/test/InfoPlist.stencil create mode 100644 Tuist/Templates/test/Test.stencil create mode 100644 Tuist/Templates/test/test.swift diff --git a/Tuist/Templates/test/InfoPlist.stencil b/Tuist/Templates/test/InfoPlist.stencil new file mode 100644 index 00000000..b31ce7b0 --- /dev/null +++ b/Tuist/Templates/test/InfoPlist.stencil @@ -0,0 +1,8 @@ + + + + + ENABLE_TESTING_SEARCH_PATHS + YES + + diff --git a/Tuist/Templates/test/Test.stencil b/Tuist/Templates/test/Test.stencil new file mode 100644 index 00000000..c0c58ef3 --- /dev/null +++ b/Tuist/Templates/test/Test.stencil @@ -0,0 +1,10 @@ +import ComposableArchitecture +import XCTest + +@testable import {{ target }} + +final class {{ target }}Tests: XCTestCase { + func test() { + + } +} diff --git a/Tuist/Templates/test/test.swift b/Tuist/Templates/test/test.swift new file mode 100644 index 00000000..ec183842 --- /dev/null +++ b/Tuist/Templates/test/test.swift @@ -0,0 +1,27 @@ +// +// test.swift +// ProjectDescriptionHelpers +// +// Created by 김민호 on 10/10/24. +// + +import ProjectDescription + +let appProjectAttribute: Template.Attribute = .required("project") +let appTargetAttribute: Template.Attribute = .required("target") + +let appTemplate = Template( + description: "Target template", + attributes: [ + appProjectAttribute, + appTargetAttribute + ], + items: [ + .file( + path: "Projects/\(appProjectAttribute)/\(appTargetAttribute)Tests/Sources/\(appTargetAttribute)Tests.swift", + templatePath: "Test.stencil"), + .file( + path: "Projects/\(appProjectAttribute)/\(appTargetAttribute)Tests/Resources/info.plist", + templatePath: "InfoPlist.stencil"), + ] +)