From 33543dcde55277a7030da5e113a7263c2d0bcf33 Mon Sep 17 00:00:00 2001 From: Bori-github Date: Sun, 8 Mar 2026 16:25:45 +0900 Subject: [PATCH 1/3] =?UTF-8?q?chore(ci):=20PR=20=EC=8B=9C=20=ED=85=8C?= =?UTF-8?q?=EC=8A=A4=ED=8A=B8=20=EC=8B=A4=ED=96=89=20GitHub=20Actions=20?= =?UTF-8?q?=EC=9B=8C=ED=81=AC=ED=94=8C=EB=A1=9C=EC=9A=B0=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/test.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..ed3b907 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,28 @@ +name: Test + +on: + pull_request: + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: pnpm/action-setup@v4 + with: + version: latest + + - uses: actions/setup-node@v4 + with: + node-version-file: .nvmrc + cache: pnpm + + - name: Install dependencies + run: pnpm install + + - name: Build react-zpl + run: pnpm --filter @zpl-kit/react-zpl build + + - name: Run tests + run: pnpm --filter @zpl-kit/tests test --run From 2096aeaeac99e2ea9c20b388ec7a225cb17987b5 Mon Sep 17 00:00:00 2001 From: Bori-github Date: Sun, 8 Mar 2026 16:32:05 +0900 Subject: [PATCH 2/3] =?UTF-8?q?fix(pnpm):=20tests=20=ED=8C=A8=ED=82=A4?= =?UTF-8?q?=EC=A7=80=EB=A5=BC=20=EC=9B=8C=ED=81=AC=EC=8A=A4=ED=8E=98?= =?UTF-8?q?=EC=9D=B4=EC=8A=A4=EC=97=90=20=ED=8F=AC=ED=95=A8=ED=95=98?= =?UTF-8?q?=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - tests/* → tests로 변경하여 @zpl-kit/tests 인식 --- pnpm-workspace.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 6ce4744..284e2bb 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,5 +1,5 @@ packages: - 'apps/*' - 'docs' - - 'tests/*' + - 'tests' - 'demos/*' From 3554f722869d5cbad514ce78c47dacca11dd6ef4 Mon Sep 17 00:00:00 2001 From: Bori-github Date: Sun, 8 Mar 2026 16:44:31 +0900 Subject: [PATCH 3/3] =?UTF-8?q?test(tests):=20Line,=20DiagonalLine=20?= =?UTF-8?q?=EA=B8=B0=EB=8C=80=EA=B0=92=EC=9D=84=20ZPL=20=ED=91=9C=EC=A4=80?= =?UTF-8?q?=20\\&=EB=A1=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/unit/DiagonalLine.test.tsx | 4 ++-- tests/unit/Line.test.tsx | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/unit/DiagonalLine.test.tsx b/tests/unit/DiagonalLine.test.tsx index 7e3cefd..9abd6b8 100644 --- a/tests/unit/DiagonalLine.test.tsx +++ b/tests/unit/DiagonalLine.test.tsx @@ -18,7 +18,7 @@ describe('DiagonalLine', () => { height: 30, }); expect(DiagonalLine.print(el, defaultContext)).toBe( - '^FO0,0\n^GD30,30,1,B,R^FS' + '^FO0,0\\&^GD30,30,1,B,R^FS' ); }); @@ -32,7 +32,7 @@ describe('DiagonalLine', () => { thickness: 2, }); expect(DiagonalLine.print(el, defaultContext)).toBe( - '^FO10,20\n^GD50,40,2,B,L^FS' + '^FO10,20\\&^GD50,40,2,B,L^FS' ); }); diff --git a/tests/unit/Line.test.tsx b/tests/unit/Line.test.tsx index 526ea71..eacd58a 100644 --- a/tests/unit/Line.test.tsx +++ b/tests/unit/Line.test.tsx @@ -17,7 +17,7 @@ describe('Line', () => { length: 100, direction: 'horizontal', }); - expect(Line.print(el, defaultContext)).toBe('^FO0,0\n^GB100,1,1,B,0^FS'); + expect(Line.print(el, defaultContext)).toBe('^FO0,0\\&^GB100,1,1,B,0^FS'); }); it('fieldOrigin, thickness, lineColor 지정 시 올바른 ZPL 생성', () => { @@ -30,7 +30,7 @@ describe('Line', () => { lineColor: 'B', }); expect(Line.print(el, defaultContext)).toBe( - '^FO10,20\n^GB100,2,2,B,0^FS' + '^FO10,20\\&^GB100,2,2,B,0^FS' ); }); @@ -50,7 +50,7 @@ describe('Line', () => { length: 50, direction: 'vertical', }); - expect(Line.print(el, defaultContext)).toBe('^FO0,0\n^GB1,50,1,B,0^FS'); + expect(Line.print(el, defaultContext)).toBe('^FO0,0\\&^GB1,50,1,B,0^FS'); }); it('fieldOrigin, thickness 지정 시 올바른 ZPL 생성', () => { @@ -61,7 +61,7 @@ describe('Line', () => { fieldOriginY: 40, thickness: 3, }); - expect(Line.print(el, defaultContext)).toBe('^FO30,40\n^GB3,80,3,B,0^FS'); + expect(Line.print(el, defaultContext)).toBe('^FO30,40\\&^GB3,80,3,B,0^FS'); }); });