-
Notifications
You must be signed in to change notification settings - Fork 6
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
0d89d42
commit 8a7d718
Showing
8 changed files
with
3,339 additions
and
79 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,3 @@ | ||
{ | ||
"presets": ["es2015-rollup"], | ||
"plugins": [ | ||
"transform-react-jsx", | ||
"transform-object-rest-spread" | ||
] | ||
"presets": ["env", "react"] | ||
} |
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,58 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`ScrollInto renders with children 1`] = ` | ||
<div | ||
className="" | ||
onClick={[Function]} | ||
style={Object {}} | ||
> | ||
<div> | ||
Some child content | ||
</div> | ||
</div> | ||
`; | ||
|
||
exports[`ScrollInto renders with custom className 1`] = ` | ||
<div | ||
className="custom-class" | ||
onClick={[Function]} | ||
style={Object {}} | ||
> | ||
<div> | ||
Some child content | ||
</div> | ||
</div> | ||
`; | ||
|
||
exports[`ScrollInto renders with custom styles 1`] = ` | ||
<div | ||
className="" | ||
onClick={[Function]} | ||
style={ | ||
Object { | ||
"display": "inline", | ||
} | ||
} | ||
> | ||
<div> | ||
Some child content | ||
</div> | ||
</div> | ||
`; | ||
|
||
exports[`ScrollInto renders with custom styles and className 1`] = ` | ||
<div | ||
className="pinky" | ||
onClick={[Function]} | ||
style={ | ||
Object { | ||
"color": "red", | ||
"display": "inline", | ||
} | ||
} | ||
> | ||
<div> | ||
Some child content | ||
</div> | ||
</div> | ||
`; |
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,55 @@ | ||
import React from 'react' | ||
import ScrollInto from './index' | ||
import renderer from 'react-test-renderer' | ||
|
||
test('ScrollInto renders with children', () => { | ||
const component = renderer.create( | ||
<ScrollInto selector="test"> | ||
<div> | ||
Some child content | ||
</div> | ||
</ScrollInto>, | ||
) | ||
|
||
let tree = component.toJSON() | ||
expect(tree).toMatchSnapshot() | ||
}) | ||
|
||
test('ScrollInto renders with custom className', () => { | ||
const component = renderer.create( | ||
<ScrollInto selector="test" className="custom-class"> | ||
<div> | ||
Some child content | ||
</div> | ||
</ScrollInto>, | ||
) | ||
|
||
let tree = component.toJSON() | ||
expect(tree).toMatchSnapshot() | ||
}) | ||
|
||
test('ScrollInto renders with custom styles', () => { | ||
const component = renderer.create( | ||
<ScrollInto selector="test" style={{display: 'inline'}}> | ||
<div> | ||
Some child content | ||
</div> | ||
</ScrollInto>, | ||
) | ||
|
||
let tree = component.toJSON() | ||
expect(tree).toMatchSnapshot() | ||
}) | ||
|
||
test('ScrollInto renders with custom styles and className', () => { | ||
const component = renderer.create( | ||
<ScrollInto selector="test" style={{display: 'inline', color: 'red'}} className="pinky"> | ||
<div> | ||
Some child content | ||
</div> | ||
</ScrollInto>, | ||
) | ||
|
||
let tree = component.toJSON() | ||
expect(tree).toMatchSnapshot() | ||
}) |
Oops, something went wrong.