Skip to content

Conversation

@matthewlehew
Copy link
Contributor

@matthewlehew matthewlehew commented Nov 20, 2025

This PR adds a few tests, including one that tripped me up and one mentioned as a goal by @talha-ahsan in #920 (comment). It also includes a couple corrections resulting from the tests.

  • MWL test to ensure all printed copies of a card are included in a banlist (I made the mistake of not adding all printings of False Lead to 25.12 Standard)
  • MWL test to ensure all items are listed in chronological order (to avoid placeholders being left in)
    • This resulted in date_start corrections for sunset-ban-list-24-01, startup-ban-list-24-01-for-classic-only, and startup-ban-list-24-09-for-classic-only. New dates were pulled from relevant posts on nullsignal.games/blog.
  • v2/card_sets.json test to ensure items are listed in chronological order.
    • This resulted in swapping the order of core-set and draft, the first two items on the list. I couldn't find anything to indicate either had a wrong date.
  • v2/card_cycles.json test to ensure every cycle had a unique position.
    • No preexisting issues with this test, but just seemed like a "nice to have."
    • Original test was checking for each cycle to increment by 1, but then I noticed the list is missing positions 14-19 🤷

@talha-ahsan talha-ahsan self-requested a review November 20, 2025 17:19
mwl.json Outdated
"cards": { "33025": { "deck_limit": 0 }, "33051": { "deck_limit": 0 } },
"code": "startup-ban-list-24-01-for-classic-only",
"date_start": "2023-09-21",
"date_start": "2024-01-19",
Copy link
Contributor

Choose a reason for hiding this comment

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

some of these are intentional, namely NRDB classic does not handle formats well so the incorrect active date allows us to have startup balance updates available without being the default if the latest ban list is for startup and not standard

any (ignore active date) MWL entries have date_start values intentionally before their actual ones to avoid conflicts.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, that makes a lot of sense and explains what I was seeing, thanks!

Do you think there's value in leaving the dates corrected and removing the (ignore active date) note for archive/historical accuracy (and cleaning up the dropdown list) since the latest ban list is standard, and then just maintaining the temp older date and (ignore active date) note in the future for the latest startup list only until a new standard list is released?

const currDate = new Date(mwl[i].date_start);

expect(currDate.getTime(),
`MWL entries out of order: ${mwl[i].name} (${mwl[i].date_start}) comes after ${mwl[i - 1].name} (${mwl[i - 1].date_start}) in the list, but has an earlier date`
Copy link
Contributor

Choose a reason for hiding this comment

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

alongside the comment about startup dates being intentionally incorrect, in the past we've hardcoded the intentionally incorrect ban lists to avoid testing them (see

const ignoreRestrictions = new Set<string>(
)

I think either having the same hardcoding as a stopgap, or just skipping entries that say "ignore active date" should be done here as well.

});
});

it('mwl entries are listed in chronological order', () => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

i actually think you don't need this test. we tend to just append anyway.

@talha-ahsan
Copy link
Contributor

talha-ahsan commented Nov 21, 2025 via email

@matthewlehew matthewlehew changed the title Add tests and correct JSON data Add tests Nov 21, 2025
@matthewlehew
Copy link
Contributor Author

PR updated:

  • Removed chronological order tests per @plural
  • Reset JSON data per convo with @talha-ahsan. If you ever reconsider keeping those dates corrected I'd be happy to volunteer to take that on and monitor with future updates, if only because I think the Ban List dropdown on NRDB looks a lot nicer without the (ignore active date) inline notes. :)

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.

3 participants