-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[email protected] - Refactor component to allow fractional stars. (#2170)
* [email protected] - Refactor component to allow fractional stars. * [email protected] - Fix test comment. * [email protected] - Remove template string. * [email protected] - Update test description. * [email protected] - PR comments.
- Loading branch information
1 parent
5975020
commit 3219260
Showing
9 changed files
with
177 additions
and
89 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// eslint-disable-next-line import/prefer-default-export | ||
export const VALID_STAR_RATING_SIZES = { | ||
small: true, | ||
medium: true, | ||
large: true | ||
}; |
17 changes: 17 additions & 0 deletions
17
packages/components/molecules/f-rating/src/tests/constants.test.js
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,17 @@ | ||
import { VALID_STAR_RATING_SIZES } from '../constants'; | ||
|
||
describe('`constants`', () => { | ||
describe('VALID_STAR_RATING_SIZES', () => { | ||
it('should contain the correct sizes', () => { | ||
// Arrange | ||
const values = { | ||
small: true, | ||
medium: true, | ||
large: true | ||
}; | ||
|
||
// Act & Assert | ||
expect(VALID_STAR_RATING_SIZES).toEqual(values); | ||
}); | ||
}); | ||
}); |
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