Skip to content

Commit

Permalink
fix: update snaps replace filename to mock name
Browse files Browse the repository at this point in the history
  • Loading branch information
gusliedke committed Jul 3, 2019
1 parent b9bbb48 commit 3589279
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 18 deletions.
8 changes: 1 addition & 7 deletions assetTransformer.js
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
const path = require('path');

module.exports = {
process(src, filename, config, options) {
return `module.exports = ${JSON.stringify(path.basename(filename))};`;
}
};
export default 'mock.asset';
2 changes: 1 addition & 1 deletion src/components/Atoms/Checkbox/Checkbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
import styled from 'styled-components';

import Text from '../Text/Text';
import { checkBoxIcon } from './assets/checkbox-white-tick.png';
import checkBoxIcon from './assets/checkbox-white-tick.png';

const StyledInput = styled.input`
font-size: ${({ theme }) => theme.fontSize('sm')};
Expand Down
4 changes: 2 additions & 2 deletions src/components/Atoms/Checkbox/Checkbox.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ it('renders correctly', () => {
}
.c1:checked + span {
background: url() no-repeat center;
background: url(mock.asset) no-repeat center;
background-color: #7d2ca9;
background-size: contain;
}
Expand Down Expand Up @@ -101,7 +101,7 @@ it('renders correctly', () => {
}
.c1:checked + span {
background: url() no-repeat center;
background: url(mock.asset) no-repeat center;
background-color: #7d2ca9;
background-size: contain;
}
Expand Down
6 changes: 1 addition & 5 deletions src/components/Atoms/Logo/Logo.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,7 @@ it('renders correctly', () => {
<img
alt="CR18 Logo"
className="c1"
src={
Object {
"process": [Function],
}
}
src="mock.asset"
/>
</div>
`);
Expand Down
4 changes: 2 additions & 2 deletions src/components/Atoms/SelectField/SelectField.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import PropTypes from 'prop-types';
import styled from 'styled-components';

import Text from '../Text/Text';
import { dropDownIcon } from './assets/drop-down-dark-purple.svg';
import { alertIcon } from './assets/error-alert-icon.png';
import dropDownIcon from './assets/drop-down-dark-purple.svg';
import alertIcon from './assets/error-alert-icon.png';

const StyledInput = styled.select`
background-color: ${({ color, theme }) =>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Atoms/SelectField/SelectField.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ it('renders correctly', () => {
padding: 12px 50px 8px 10px;
height: 50px;
font-weight: 300;
background: transparent url() calc(100% - 20px) 18px/20px 20px no-repeat;
background: transparent url(mock.asset) calc(100% - 20px) 18px/20px 20px no-repeat;
cursor: pointer;
margin-bottom: 0;
cursor: pointer;
Expand Down

0 comments on commit 3589279

Please sign in to comment.