diffSpec 시 변경된 hash값만 리턴하도록 수정 #24
Merged
GitHub Actions / Test Logs
succeeded
Jan 30, 2026 in 1s
101 passed, 0 failed and 0 skipped
| Report | Passed | Failed | Skipped | Time |
|---|---|---|---|---|
| packages/patchlogr-cli/.coverage/report.xml | 1✅ | 10ms | ||
| packages/patchlogr-core/.coverage/report.xml | 40✅ | 129ms | ||
| packages/patchlogr-oas/.coverage/report.xml | 60✅ | 1s |
✅ packages/patchlogr-cli/.coverage/report.xml
1 tests were completed in 10ms with 1 passed, 0 failed and 0 skipped.
| Test suite | Passed | Failed | Skipped | Time |
|---|---|---|---|---|
| src/tests/sample.test.ts | 1✅ | 10ms |
✅ src/tests/sample.test.ts
✅ @patchlogr/cli > sample test
✅ packages/patchlogr-core/.coverage/report.xml
40 tests were completed in 129ms with 40 passed, 0 failed and 0 skipped.
| Test suite | Passed | Failed | Skipped | Time |
|---|---|---|---|---|
| src/diff/tests/diffChildNodes.test.ts | 8✅ | 24ms | ||
| src/diff/tests/diffLeafNodes.test.ts | 2✅ | 19ms | ||
| src/diff/tests/diffNode.test.ts | 15✅ | 16ms | ||
| src/diff/tests/diffTypeChange.test.ts | 3✅ | 14ms | ||
| src/partition/tests/partitionByMethod.test.ts | 5✅ | 26ms | ||
| src/partition/tests/partitionByTag.test.ts | 6✅ | 24ms | ||
| src/utils/tests/createHash.test.ts | 1✅ | 5ms |
✅ src/diff/tests/diffChildNodes.test.ts
✅ diffChildNodes > removed detection (base에만 존재) > base에만 있는 leaf child는 removed로 감지
✅ diffChildNodes > removed detection (base에만 존재) > base에만 있는 node child는 removed로 감지 (서브트리)
✅ diffChildNodes > added detection (head에만 존재) > head에만 있는 leaf child는 added로 감지
✅ diffChildNodes > added detection (head에만 존재) > head에만 있는 node child는 added로 감지 (서브트리)
✅ diffChildNodes > modifiedPairs (공통 자식 중 hash가 다른 경우) > 공통 자식의 hash가 다르면 modifiedPairs에 포함
✅ diffChildNodes > modifiedPairs (공통 자식 중 hash가 다른 경우) > 공통 자식의 hash가 같으면 modifiedPairs에 포함되지 않음
✅ diffChildNodes > 복합 시나리오 > added, removed, modified가 동시에 존재하는 경우
✅ diffChildNodes > 복합 시나리오 > 빈 children을 가진 node들 비교
✅ src/diff/tests/diffLeafNodes.test.ts
✅ diffLeafNodes > 두 leaf의 hash가 다른 경우 modified change 생성
✅ diffLeafNodes > path는 전달받은 그대로 사용
✅ src/diff/tests/diffNode.test.ts
✅ diffNode > base.hash === head.hash인 경우 changes는 빈 배열이어야 함
✅ diffNode > base와 head가 둘 다 leaf이고 hash가 다른 경우 modified 1건
✅ diffNode > base와 head가 둘 다 node이고 hash가 다른 경우 children을 key 기준으로 비교
✅ diffNode > base에만 있는 childKey가 존재하는 경우 removed 1건
✅ diffNode > head에만 있는 childKey가 존재하는 경우 added 1건
✅ diffNode > base와 head 모두에 있는 childKey인데 child hash가 같은 경우 탐색하지 않음
✅ diffNode > base와 head 모두에 있는 childKey인데 child hash가 다른 경우 재귀
✅ diffNode > base에만 있는 child가 node(subtree)인 경우 removed는 1건이어야 함
✅ diffNode > head에만 있는 child가 node(subtree)인 경우 added는 1건이어야 함
✅ diffNode > base가 node이고 head가 leaf인 경우 type_changed 1건
✅ diffNode > base가 leaf이고 head가 node인 경우 type_changed 1건
✅ path / key > 모든 change에는 path가 있어야 함 (root부터 변화 노드까지)
✅ path / key > change.key는 path의 마지막 요소와 동일해야 함
✅ path / key > 동일한 path/key에 대해 change가 중복 생성되면 안 됨
✅ path / key > baseHash/headHash 필드는 일관돼야 함
✅ src/diff/tests/diffTypeChange.test.ts
✅ diffTypeChange > node -> leaf 타입 변경 시 type_changed 생성
✅ diffTypeChange > leaf -> node 타입 변경 시 type_changed 생성
✅ diffTypeChange > path는 전달받은 그대로 사용
✅ src/partition/tests/partitionByMethod.test.ts
✅ partitionByMethod > HTTPMethod 를 기준으로 파티셔닝 한다
✅ partitionByMethod > 여러 HTTPMethod 를 기준으로 파티셔닝 한다
✅ partitionByMethod > hashObjects를 리턴한다
✅ partitionByMethod > 리프노드에는 value가 포함되지 않는다
✅ partitionByMethod > hashObjects에 리프노드에 대한 CanonicalOperation 이 매핑된다
✅ src/partition/tests/partitionByTag.test.ts
✅ partitionByTag > 첫 번째 tag를 기준으로 파티셔닝 한다
✅ partitionByTag > 여러 tag를 기준으로 파티셔닝 한다
✅ partitionByTag > tag가 없는 경우 default tag로 파티셔닝 한다
✅ partitionByTag > hashObjects를 리턴한다
✅ partitionByTag > 리프노드에는 value가 포함되지 않는다
✅ partitionByTag > hashObjects에 리프노드에 대한 CanonicalOperation 이 매핑된다
✅ src/utils/tests/createHash.test.ts
✅ createHash > createSHA256Hash > sha256 hash 는 동일한 입력에 대해 동일한 결과를 반환한다
✅ packages/patchlogr-oas/.coverage/report.xml
60 tests were completed in 1s with 60 passed, 0 failed and 0 skipped.
| Test suite | Passed | Failed | Skipped | Time |
|---|---|---|---|---|
| src/tests/preprocessOASDocument.test.ts | 2✅ | 588ms | ||
| src/canonicalize/tests/v2/canonicalizeOASV2.test.ts | 16✅ | 37ms | ||
| src/canonicalize/tests/v3/canonicalizeOASV3.test.ts | 12✅ | 47ms | ||
| src/guards/tests/guardTests.test.ts | 3✅ | 3ms | ||
| src/pipeline/tests/OASBundleStage.test.ts | 1✅ | 11ms | ||
| src/pipeline/tests/OASDereferenceStage.test.ts | 1✅ | 4ms | ||
| src/pipeline/tests/OASValidationStage.test.ts | 7✅ | 701ms | ||
| src/pipeline/tests/PipelineExecutor.test.ts | 2✅ | 6ms | ||
| src/utils/tests/oasVersionUtils.test.ts | 5✅ | 6ms | ||
| src/utils/tests/toCanonicalSchema.test.ts | 4✅ | 7ms | ||
| src/utils/tests/toCanonicalSchemaV2.test.ts | 3✅ | 9ms | ||
| src/utils/tests/toCanonicalSchemaV3.test.ts | 4✅ | 4ms |
✅ src/tests/preprocessOASDocument.test.ts
✅ preprocessOASDocument Integration > OAS 2.0 문서를 canonical spec으로 변환한다
✅ preprocessOASDocument Integration > OAS 3.0 문서를 canonical spec으로 변환한다
✅ src/canonicalize/tests/v2/canonicalizeOASV2.test.ts
✅ canonicalizeOASV2 > 'info' 를 올바르게 매핑한다
✅ canonicalizeOASV2 > 올바른 operation 키를 생성한다
✅ canonicalizeOASV2 > path-level 및 operation-level parameter를 병합한다
✅ canonicalizeOASV2 > body parameter를 올바르게 변환한다
✅ canonicalizeOASV2 > formData를 올바른 content-type으로 body로 변환한다
✅ canonicalizeOASV2 > 응답과 produces를 올바르게 매핑한다
✅ canonicalizeOASV2 > operation 메타데이터를 올바르게 매핑한다
✅ canonicalizeOASV2 > 전체 canonical spec을 올바르게 생성한다
✅ categorizeParameters > 요청 파라미터, form data, body 파라미터를 분리한다
✅ normalizeGeneralParam > 일반 파라미터를 정규화한다
✅ normalizeGeneralParam > array 타입의 파라미터에 collectionFormat을 포함한다
✅ processRequestBody > body 파라미터를 처리한다
✅ processFormData > form data를 처리한다
✅ processFormData > form data의 추가 프로퍼티 (default, enum)을 유지하고 items를 정규화한다
✅ processResponses > 응답을 처리한다
✅ extractDocMetadata > 문서 메타데이터를 추출한다
✅ src/canonicalize/tests/v3/canonicalizeOASV3.test.ts
✅ canonicalizeOASV3 > info 프로퍼티를 올바르게 매핑한다
✅ canonicalizeOASV3 > operation 키를 올바르게 생성한다
✅ canonicalizeOASV3 > path-level과 operation-level 파라미터를 병합한다
✅ canonicalizeOASV3 > body 파라미터를 올바르게 변환한다
✅ canonicalizeOASV3 > multipart/form-data를 body로 변환한다
✅ canonicalizeOASV3 > 응답과 dereference 로직을 매핑한다
✅ canonicalizeOASV3 > operation 메타데이터를 매핑한다
✅ canonicalizeOASV3 > 전체 canonical spec을 생성한다
✅ canonicalizeOASV3 Helpers > normalizeParameters > 파라미터를 정규화한다
✅ canonicalizeOASV3 Helpers > normalizeRequestBody > request body를 정규화한다
✅ canonicalizeOASV3 Helpers > processResponses > 응답을 처리한다
✅ canonicalizeOASV3 Helpers > extractDocMetadata > 문서 메타데이터를 추출한다
✅ src/guards/tests/guardTests.test.ts
✅ Guards > isSchemaObject > 스키마 객체에 대해 true 를 반환한다
✅ Guards > isSchemaObject > 참조 객체에 대해 false 를 반환한다
✅ Guards > isSchemaObject > null에 대해 false 를 반환한다
✅ src/pipeline/tests/OASBundleStage.test.ts
✅ OASBundleStage > external $ref를 dereference한다
✅ src/pipeline/tests/OASDereferenceStage.test.ts
✅ OASDereferenceStage > input.oas가 없으면 에러를 던진다
✅ src/pipeline/tests/OASValidationStage.test.ts
✅ SwaggerValidationStage > 3.0.x 버전을 파싱한다
✅ SwaggerValidationStage > 2.0 버전을 파싱한다
✅ SwaggerValidationStage > 3.1 버전을 파싱한다
✅ SwaggerValidationStage > 올바른 OAS 문서를 검증한다
✅ SwaggerValidationStage > 올바르지 않은 OAS 문서를 검증한다
✅ SwaggerValidationStage > input.oas가 없으면 에러를 던진다
✅ SwaggerValidationStage > 검증된 oas object를 context에 업데이트한다
✅ src/pipeline/tests/PipelineExecutor.test.ts
✅ PipelineExecutor > stages 들을 올바르게 추가한다
✅ PipelineExecutor > stages를 올바른 순서로 실행한다
✅ src/utils/tests/oasVersionUtils.test.ts
✅ OASVersionUtils > getOASVersion returns correct version for 3.+
✅ OASVersionUtils > getOASVersion 는 2.0 버전을 반환한다
✅ OASVersionUtils > getOASVersion 은 unknown 버전을 반환한다
✅ OASVersionUtils > isOpenAPIV3 should correctly identify OpenAPI v3 documents
✅ OASVersionUtils > isOpenAPIV2 should correctly identify OpenAPI v2 documents
✅ src/utils/tests/toCanonicalSchema.test.ts
✅ toCanonicalSchema > schema를 canonical schema로 변환한다
✅ toCanonicalSchema > nested properties를 canonical schema로 변환한다
✅ toCanonicalSchema > nested arrays를 canonical schema로 변환한다
✅ toCanonicalSchema > tuple items (array of schemas)를 canonical schema로 변환한다
✅ src/utils/tests/toCanonicalSchemaV2.test.ts
✅ toCanonicalSchemaV2 > string schema를 canonical schema로 변환한다
✅ toCanonicalSchemaV2 > required fields를 canonical schema로 변환한다
✅ toCanonicalSchemaV2 > nullable을 canonical schema로 변환한다
✅ src/utils/tests/toCanonicalSchemaV3.test.ts
✅ toCanonicalSchemaV3 > string schema를 canonical schema로 변환한다
✅ toCanonicalSchemaV3 > required fields를 canonical schema로 변환한다
✅ toCanonicalSchemaV3 > missing type을 canonical schema로 변환한다
✅ toCanonicalSchemaV3 > nullable을 canonical schema로 변환한다
Loading