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

Update deprecations tests to use YAML list #1996

Merged
merged 3 commits into from
May 29, 2024
Merged

Conversation

jathak
Copy link
Member

@jathak jathak commented May 21, 2024

We don't have a good way to make the YAML file accessible to tests
running in a browser, so we can just skip them there.
@jathak jathak requested a review from nex3 May 21, 2024 23:08
};
const obsoleteDeprecations: {[key: string]: [string, string]} = {};
const activeDeprecations: {[key: string]: string} = {};
const futureDeprecations: {[key: string]: true} = {};
Copy link
Contributor

Choose a reason for hiding this comment

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

It's probably cleaner to use a Set for this.

const deprecation = deprecationsMap[id];
expect(deprecation?.id).toBe(id);
expect(deprecation?.status).toBe('obsolete');
expect(deprecation?.deprecatedIn).toEqual(Version.parse(deprecatedIn));
Copy link
Contributor

Choose a reason for hiding this comment

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

Might be worth adding a comment here to the effect that if we ever have a JS API backed by a non-Dart-Sass implementation, it may have different versions for these.

@jathak jathak merged commit bf2e3c8 into main May 29, 2024
18 checks passed
@jathak jathak deleted the generated-deprecations branch May 29, 2024 21:23
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