Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(DataResolver): fix circular dependency error with GuildTemplate #5622

Merged
merged 4 commits into from May 22, 2021
Merged

fix(DataResolver): fix circular dependency error with GuildTemplate #5622

merged 4 commits into from May 22, 2021

Conversation

cherryblossom000
Copy link
Contributor

Please describe the changes this PR makes and why it should be merged:

Fixes #5600

Status and versioning classification:

  • Code changes have been tested against the Discord API, or there are no code changes


describe('resolveGuildTemplateCode', () => {
test('basic', () => {
expect(DataResolver.resolveGuildTemplateCode('https://discord.new/abc')).toBe('abc');
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wasn't sure if this test is really necessary, but because I technically changed the code in resolveGuildTemplateCode, I added this just in case. I'm happy to remove it if this is unnecessary.

There don't seem to be many existing tests, so I just copied what was in test/escapeMarkdown.test.js.

Comment on lines -3 to +4
/* eslint-disable max-len, no-undef */
/* eslint-env jest */
/* eslint-disable max-len */
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I noticed that jest is listed as a dev dependency in package.json, so I enabled the jest ESLint environment so that no-undef can still be enabled without spewing warnings about describe, test, and expect being undefined.

src/util/DataResolver.js Outdated Show resolved Hide resolved
@iCrawl iCrawl merged commit b376f31 into discordjs:master May 22, 2021
@cherryblossom000 cherryblossom000 deleted the 5600 branch May 22, 2021 22:19
@iCrawl iCrawl added this to the Version 13 milestone Jun 27, 2021
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.

Circular dependency in DataResolver/GuildTemplate
2 participants