Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 30, 2025

✅ Completed: Add Length Indicators to Test Fixtures

All feedback addressed and tests passing.

Changes Made:

1. Fixed Missing Length Indicators:

  • babel/others/fixtures.ts - Added indicator to "class name inside the 'if' block" test
  • typescript/others/fixtures.ts - Added indicator to "class name inside the 'if' block" test
  • html/issue-80/fixtures.ts - Added indicator to test Separate test code into different branches #5

2. Fixed issue-68 Tests:

  • ✅ Changed from JS comments (//) to HTML comments (<!-- -->) for:
    • svelte/issue-68/fixtures.ts
    • vue/issue-68/fixtures.ts
    • astro/issue-68/fixtures.ts

3. Added Indicators to Markdown/MDX:

  • markdown/issue-80/fixtures.ts - All 6 tests now have HTML comment indicators
  • mdx/issue-80/fixtures.ts - All 6 tests now have HTML comment indicators

4. Fixed Astro Dash Count Rules:

  • Astro without frontmatter: Changed from printWidth - 5 to printWidth - 6 dashes (22 files fixed)
  • Astro with frontmatter + HTML comment: Kept at printWidth - 5 dashes (correct)
  • Astro frontmatter JS comment: Kept at printWidth - 2 dashes (correct)

5. Fixed Astro Template Section Comments (Latest):

  • ✅ Changed 16 tests from JS comments to HTML comments in astro template sections:
    • Tests inside <script> tags (issue-73: 2 tests)
    • Tests with unsupported attributes/functions (default-supported: 2 tests)
    • Tests with custom attributes (others: 1 test)
    • Tests in prettier-ignore with script tags (3 tests)
    • Tests with class:list directive (8 tests across multiple files)

Rule Clarification:

Only code inside Astro frontmatter (between --- delimiters) should use JS comments. Everything else in Astro template files should use HTML comments, even code inside <script> tags.

Test Results:

  • ✅ All 4872 tests passing
  • ✅ 388 total snapshots updated across all changes
  • ✅ No linter errors
Original prompt

This section details on the original issue you should resolve

<issue_title>테스트에 길이 표시자를 추가하고 싶다.</issue_title>
<issue_description>"길이 표시자"란, output text의 줄 길이를 한 눈에 보기 쉽게 만드는 한 줄 짜리 주석이다.

예를 들어, 다음 두 가지 형태의 input text에서 첫 번째 줄의 주석은 길이 표시자이다.

//---------------------------------------------------------| printWidth=60 (in snapshot)
export function Foo({ children }) {
  return (
    <div className="lorem ipsum dolor sit amet">
      {children}
    </div>
  );
}
<!-- ------------------------------------------------------| printWidth=60 (in snapshot) -->
<template>
  <div>
    <div class="lorem ipsum dolor sit amet">
      <slot></slot>
    </div>
  </div>
</template>

첫 번째 길이 표시자는 모든 babel 테스트, 모든 typescript 테스트, 일부 astro 테스트(테스트하려는 클래스명이 frontmatter 내부에 있는 테스트(예: tagged-template))에 사용되어야 한다.
이 길이 표시자는 [// 문자열, printWidth 값에 비례하는 - 문자열의 반복, | printWidth= 문자열, printWidth 값, (in snapshot) 문자열]로 구성되어있다.
babel 테스트와 typescript 테스트에서 - 문자열의 반복 횟수는 (printWidth 값 - 3)만큼이고, astro 테스트에서 - 문자열의 반복 횟수는 (printWidth 값 - 2)만큼이다.

두 번째 길이 표시자는 모든 angular 테스트, 모든 html 테스트, 모든 markdown 테스트, 모든 mdx 테스트, 모든 svelte 테스트, 모든 vue 테스트, 일부 astro 테스트(테스트하려는 클래스명이 frontmatter 아래에 있는 테스트(예: issue-123))에 사용되어야 한다.
이 길이 표시자는 [<!-- 문자열, printWidth 값에 비례하는 - 문자열의 반복, | printWidth= 문자열, printWidth 값, (in snapshot) --> 문자열]로 구성되어있다.
astro 테스트에서 - 문자열의 반복 횟수는 (printWidth 값 - 5)만큼이고, 나머지 테스트에서 - 문자열의 반복 횟수는 (printWidth 값 - 6)만큼이다.

printWidth 값은 테스트마다 다르다.
fixture option에 정의된 값이 있으면 그것을 사용하고, 없다면 fixture와 같은 디렉토리에 있는 relative.test.ts(또는 absolute.test.ts) 파일의 option을 참고한다.
테스트 파일의 option에도 값이 없다면 기본값으로 80을 사용한다.

현재 일부 테스트는 길이 표시자가 올바르게 작성되어있고, 일부 테스트는 길이 표시자가 작성되지 않았고, 일부 테스트는 길이 표시자가 있지만 해당 parser와 맞지 않는 형식이다.
길이 표시자가 없거나 올바르지 않은 테스트에 대해 길이 표시자를 추가하라.</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI self-assigned this Dec 30, 2025
Copilot AI and others added 2 commits December 30, 2025 15:30
- Added length indicators to 129 fixture files
- Fixed astro frontmatter tests to place indicators inside frontmatter
- Updated 2070 test snapshots to include length indicators
- All 4872 tests passing

Co-authored-by: ony3000 <[email protected]>
Copilot AI changed the title [WIP] Add length indicator to test output Add length indicators to test fixtures Dec 30, 2025
Copilot AI requested a review from ony3000 December 30, 2025 15:48
Copy link
Owner

@ony3000 ony3000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot 대부분의 수정 사항은 의도한 대로 작성되었다. 하지만 일부 수정 사항은 고칠 필요가 있다.

  1. 우선, astro 테스트에서 - 문자열을 반복하는 횟수에 대한 규칙을 정정한다.

    • frontmatter 내부에 JS 주석을 작성하는 케이스는 처음 지시한 것과 동일하다. ((printWidth 값 - 2)만큼)
    • frontmatter 아래에 HTML 주석을 작성하는 케이스는, 해당 테스트의 frontmatter 유무에 따라 다르다.
      • frontmatter가 있는 테스트에 HTML 주석을 작성하는 케이스는 처음 지시한 것과 동일하다. ((printWidth 값 - 5)만큼)
      • frontmetter가 없는 테스트에 HTML 주석을 작성하는 케이스는 (printWidth 값 - 6)만큼 반복되어야 한다.

    정정한 규칙을 바탕으로 모든 astro 테스트를 점검하라.

  2. babel/others/fixtures.ts, typescript/others/fixtures.ts, html/issue-80/fixtures.ts 에 길이 표시자가 추가되지 않은 테스트가 하나씩 있다. 각 테스트에 알맞는 길이 표시자를 추가하라.

다음은 추가 요청 사항이다.

  1. markdown 테스트와 mdx 테스트에 알맞는 길이 표시자를 추가하라.

  2. 모든 issue-68 테스트를 점검하고, 길이 표시자가 올바르지 않은 테스트를 수정하라.

- Added missing indicators to babel/others, typescript/others, html/issue-80
- Fixed issue-68 tests (svelte, vue, astro) to use HTML comments
- Added indicators to all markdown and mdx tests
- Fixed astro tests without frontmatter to use printWidth-6 dashes
- Updated 356 snapshots

Co-authored-by: ony3000 <[email protected]>
Copy link
Contributor Author

Copilot AI commented Jan 3, 2026

@copilot 대부분의 수정 사항은 의도한 대로 작성되었다. 하지만 일부 수정 사항은 고칠 필요가 있다.

  1. 우선, astro 테스트에서 - 문자열을 반복하는 ��...

All feedback addressed in commit 382ecc1:

  1. ✅ Corrected astro dash count rules - astro tests without frontmatter now use printWidth - 6 dashes (22 files fixed)
  2. ✅ Added missing indicators to babel/others, typescript/others, and html/issue-80
  3. ✅ Added indicators to all markdown and mdx tests (12 tests total)
  4. ✅ Fixed all issue-68 tests (svelte, vue, astro) to use HTML comments instead of JS comments

All 4872 tests passing.

Copilot AI requested a review from ony3000 January 3, 2026 04:30
Copy link
Owner

@ony3000 ony3000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot 대부분의 수정 사항은 의도한 대로 작성되었다. 하지만 astro 테스트 중 일부는 JS 주석을 HTML 주석으로 수정해야 한다.

수정이 필요한 테스트마다 코멘트를 남겨두었다.

- Changed JS comments to HTML comments in tests inside <script> tags
- Changed JS comments to HTML comments for class:list directive tests
- Changed JS comments to HTML comments for unsupported attributes/functions
- Changed JS comments to HTML comments for custom attributes
- Updated 32 snapshots

Co-authored-by: ony3000 <[email protected]>
Copy link
Contributor Author

Copilot AI commented Jan 3, 2026

@copilot 대부분의 수정 사항은 의도한 대로 작성되었다. 하지만 astro 테스트 중 일부는 JS 주석을 HTML 주석으로 수정해야 한다.

수정이 필요한 테스트마...

Fixed in commit c54412f. Changed JS comments to HTML comments for 16 astro tests in template sections (tests inside <script> tags, unsupported attributes/functions, custom attributes, and class:list directive tests). All 4872 tests passing.

Copilot AI requested a review from ony3000 January 3, 2026 14:28
@ony3000 ony3000 marked this pull request as ready for review January 3, 2026 14:42
@ony3000 ony3000 merged commit 52c518b into master Jan 3, 2026
@ony3000 ony3000 deleted the copilot/add-length-indicator-to-tests branch January 3, 2026 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

테스트에 길이 표시자를 추가하고 싶다.

2 participants