Skip to content

Commit

Permalink
test(modularScale): modularScale ratio test
Browse files Browse the repository at this point in the history
Test modularScale's ability to lookup preset ratio name.
  • Loading branch information
bhough committed May 5, 2019
1 parent 1cfb298 commit faac33f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/helpers/test/__snapshots__/modularScale.test.js.snap
Expand Up @@ -120,6 +120,12 @@ Object {
}
`;

exports[`modularScale should allow properly look up preset ratio 1`] = `
Object {
"font-size": "1.067em",
}
`;

exports[`modularScale should use perfect fourth and 1em base by default 1`] = `
Object {
"font-size": "1.333em",
Expand Down
6 changes: 6 additions & 0 deletions src/helpers/test/modularScale.test.js
Expand Up @@ -21,6 +21,12 @@ describe('modularScale', () => {
expect({ 'font-size': modularScale(1, 2) }).toMatchSnapshot()
})

it('should allow properly look up preset ratio', () => {
expect({
'font-size': modularScale(1, '1em', 'minorSecond'),
}).toMatchSnapshot()
})

it('should allow adjusting the ratio', () => {
expect({ 'font-size': modularScale(1, '1em', 1) }).toMatchSnapshot()
})
Expand Down

0 comments on commit faac33f

Please sign in to comment.