-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat(exporter-tokens): Use variable prefix from tokens
- Use variable prefix from tokens for gradient and shadow color variables
- Loading branch information
1 parent
a127a3a
commit f0fec13
Showing
9 changed files
with
193 additions
and
63 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
exporters/tokens/src/helpers/__tests__/findTokenPrefix.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { Token } from '@supernovaio/sdk-exporters'; | ||
import { examplePrefixToken } from '../../../tests/fixtures/examplePrefixToken'; | ||
import { findTokenPrefix } from '../findTokenPrefix'; | ||
|
||
describe('findTokenPrefix', () => { | ||
it('should return token prefix', () => { | ||
const tokens = Array.from(examplePrefixToken.values()); | ||
const expectedValue = 'spirit-'; | ||
|
||
expect(findTokenPrefix(tokens)).toBe(expectedValue); | ||
}); | ||
|
||
it('should return empty string if token prefix is not found', () => { | ||
const tokens = [] as Token[]; | ||
const expectedValue = ''; | ||
|
||
expect(findTokenPrefix(tokens)).toBe(expectedValue); | ||
}); | ||
}); |
Oops, something went wrong.