Skip to content

Comments

Fix test structure: move forEach outside it block for proper test isolation#102

Merged
drewsonne merged 1 commit intofix/winal-radix-correctionfrom
copilot/sub-pr-94-yet-again
Jan 2, 2026
Merged

Fix test structure: move forEach outside it block for proper test isolation#102
drewsonne merged 1 commit intofix/winal-radix-correctionfrom
copilot/sub-pr-94-yet-again

Conversation

Copy link
Contributor

Copilot AI commented Jan 2, 2026

Addresses test antipattern where forEach loop was nested inside a single it block, causing all assertions to run in one test case.

Changes

  • Moved forEach loop outside it block in GMT Correlation (584285) Validation test suite
  • Each correlation data point now generates its own it test case with descriptive name

Before/After

Before: Single test with loop inside

it('should validate direct source correlations using GMT constant', () => {
  directData.slice(0, 5).forEach(correlation => {
    // assertions here
  });
});

After: Individual test cases per data point

directData.slice(0, 5).forEach(correlation => {
  it(`should validate ${correlation.maya_long_count} ${correlation.event} using GMT constant`, () => {
    // assertions here
  });
});

This provides proper test isolation, clearer failure reporting, and ensures all correlations are tested even if one fails.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.


Note

Refactors GMT correlation tests for proper isolation and clearer failures.

  • In correlation-validation.spec.ts, move setup (directData, lcFactory, gmtCorr) to suite scope
  • Replace a single it with a forEach by generating individual it cases for the first five direct-source correlations
  • Each test validates the parsed Long Count against GMT, asserting year presence for Gregorian outputs

Written by Cursor Bugbot for commit 84d4fb4. This will update automatically on new commits. Configure here.

Copilot AI mentioned this pull request Jan 2, 2026
Copilot AI changed the title [WIP] Work in progress to address feedback on radix correction Fix test structure: move forEach outside it block for proper test isolation Jan 2, 2026
Copilot AI requested a review from drewsonne January 2, 2026 17:34
Co-authored-by: drewsonne <233054+drewsonne@users.noreply.github.com>
@drewsonne drewsonne marked this pull request as ready for review January 2, 2026 17:47
@drewsonne drewsonne force-pushed the copilot/sub-pr-94-yet-again branch from f1f2e9f to 84d4fb4 Compare January 2, 2026 17:47
@drewsonne drewsonne merged commit 41febbf into fix/winal-radix-correction Jan 2, 2026
7 checks passed
@drewsonne drewsonne deleted the copilot/sub-pr-94-yet-again branch January 2, 2026 17:47
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