From 3cd418e954e18bbc960d89664a0552d949deb473 Mon Sep 17 00:00:00 2001 From: kimdonghyun Date: Mon, 23 Jun 2025 23:41:11 +0900 Subject: [PATCH 1/2] =?UTF-8?q?refactor:=20PR=EC=8B=9C=20=ED=85=8C?= =?UTF-8?q?=EC=8A=A4=ED=8A=B8=20workflow=20=EB=8F=99=EC=9E=91=ED=95=98?= =?UTF-8?q?=EB=8F=84=EB=A1=9D=20=EA=B5=AC=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pr-test-validation.yml | 29 ++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/pr-test-validation.yml diff --git a/.github/workflows/pr-test-validation.yml b/.github/workflows/pr-test-validation.yml new file mode 100644 index 0000000..48ce65c --- /dev/null +++ b/.github/workflows/pr-test-validation.yml @@ -0,0 +1,29 @@ +name: PR Test Validation + +on: + pull_request: + types: [ opened, synchronize, reopened ] + branches: [ '*' ] + +env: + NODE_VERSION: '22' + +jobs: + test: + name: Run Unit Tests + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: ${{ env.NODE_VERSION }} + + - name: Install dependencies + run: npm ci + + - name: Run tests + run: npm test \ No newline at end of file From 17a389145a017348368e6474a5af3e68ee05347d Mon Sep 17 00:00:00 2001 From: kimdonghyun Date: Mon, 23 Jun 2025 23:52:33 +0900 Subject: [PATCH 2/2] =?UTF-8?q?test:=20getKoreanTimeISO=20=ED=85=8C?= =?UTF-8?q?=EC=8A=A4=ED=8A=B8=20=EC=BC=80=EC=9D=B4=EC=8A=A4=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/utils/DateUtils.test.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/tests/utils/DateUtils.test.ts b/tests/utils/DateUtils.test.ts index 07899ed..a711cc3 100644 --- a/tests/utils/DateUtils.test.ts +++ b/tests/utils/DateUtils.test.ts @@ -3,15 +3,12 @@ import { getKoreaTimeISO, parseDate, isEqualOrAfterDateOnly } from '../../src/ut describe('DateUtils', () => { describe('getKoreaTimeISO', () => { it('ISO 형식과 한국 시간대 확인', () => { + //given const result = getKoreaTimeISO(); + //when then // ISO 형식 검증 (YYYY-MM-DDTHH:mm:ss+09:00) expect(result).toMatch(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\+09:00$/); - - // 한국 시간대 검증 - const date = new Date(result); - const koreaOffset = date.getTimezoneOffset(); - expect(koreaOffset).toBe(-540); // UTC+9 (9 * 60 = 540 minutes) }); });