Skip to content

Instantly share code, notes, and snippets.

@shawnbot
Created July 25, 2018 18:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shawnbot/ef77715337dd5cadba20c679c130e93b to your computer and use it in GitHub Desktop.
Save shawnbot/ef77715337dd5cadba20c679c130e93b to your computer and use it in GitHub Desktop.
styled-system getter bug test case

instructions

  1. clone this gist
  2. npm install to install styled-system, babel, and jest
  3. npm test to run the test
{
"private": true,
"scripts": {
"test": "jest"
},
"dependencies": {
"babel-preset-env": "1.7.0",
"jest": "23.4.1",
"styled-system": "3.0.2"
},
"babel": {
"presets": [
"env"
]
}
}
import {themeGet} from 'styled-system'
it('returns 0', () => {
const theme = {
border: [0, 2, 4]
}
expect(themeGet('border.0')(theme)).toEqual(0)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment