-
-
Notifications
You must be signed in to change notification settings - Fork 189
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
[876] Add tests for Tokens Studio sync #2756
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a clarifying question, otherwise feel free to merge!
jest.clearAllMocks(); | ||
}); | ||
|
||
it.each([ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TIL!
let tokenSets = data.data.project.sets as TokenSet[]; | ||
|
||
const dynamicTokenSets = tokenSets.filter((tokenSet) => tokenSet.type === 'DYNAMIC'); | ||
const dynamicTokenSetData = await Promise.all( | ||
dynamicTokenSets.map(async (tokenSet) => { | ||
if (!tokenSet.generatorUrn) { | ||
return null; | ||
} | ||
const tokens = await fetchDynamicTokenSetData(tokenSet.generatorUrn); | ||
return { ...tokenSet, tokens }; | ||
}), | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just out of interest, is this no longer needed? or was this never needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's no longer needed as Pop implemented resolving on backend. It was needed before that
Why does this PR exist?
Closes https://github.com/tokens-studio/studio-app/issues/876
What does this pull request do?