-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
34c7f8a
commit 436f9f5
Showing
2 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
src/__tests__/helpers/__snapshots__/appendIconStyles.test.js.snap
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,21 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`appendIconStyle should create a style tag 1`] = ` | ||
<body> | ||
<style | ||
id="sharect-style" | ||
> | ||
.sharect svg{fill:#F34;} | ||
</style> | ||
</body> | ||
`; | ||
|
||
exports[`appendMobileIconStyle should update the style for mobile 1`] = ` | ||
<body> | ||
<style | ||
id="sharect-style" | ||
> | ||
.sharect svg{fill:#F34;width:5px;height:5px;} | ||
</style> | ||
</body> | ||
`; |
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,25 @@ | ||
import { | ||
appendIconStyle, | ||
appendMobileIconStyle | ||
} from '../../helpers/appendIconStyles' | ||
|
||
const iconColor = '#F34' | ||
const mobileIconSize = 5 | ||
|
||
describe('appendIconStyle', () => { | ||
it('should create a style tag', () => { | ||
appendIconStyle({ iconColor }) | ||
|
||
expect(document.body).toMatchSnapshot() | ||
}) | ||
}) | ||
|
||
describe('appendMobileIconStyle', () => { | ||
it('should update the style for mobile', () => { | ||
appendMobileIconStyle(iconColor, mobileIconSize) | ||
|
||
expect(document.body).toMatchSnapshot() | ||
}) | ||
|
||
}) | ||
|