Skip to content

Update deprecations tests to use YAML list#1996

Merged
jathak merged 3 commits intomainfrom
generated-deprecations
May 29, 2024
Merged

Update deprecations tests to use YAML list#1996
jathak merged 3 commits intomainfrom
generated-deprecations

Conversation

@jathak
Copy link
Member

@jathak jathak commented May 21, 2024

jathak added 2 commits May 21, 2024 21:52
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
@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