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
Showing
20 changed files
with
5,931 additions
and
731 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
import React from 'react'; | ||
import Overdrive from '../src/overdrive'; | ||
import renderer from 'react-test-renderer'; | ||
/* global describe, it, expect */ | ||
|
||
import React from 'react' | ||
import Overdrive from '../src/overdrive' | ||
import renderer from 'react-test-renderer' | ||
|
||
describe('Overdrive', () => { | ||
it('should use props element to render', () => { | ||
const component = renderer.create( | ||
<Overdrive id="test" element="h1"><span>test</span></Overdrive> | ||
); | ||
let tree = component.toJSON(); | ||
expect(tree.type).toEqual('h1'); | ||
}); | ||
}); | ||
it('should use props element to render', () => { | ||
const component = renderer.create( | ||
<Overdrive id='test' element='h1'><span>test</span></Overdrive> | ||
) | ||
let tree = component.toJSON() | ||
expect(tree.type).toEqual('h1') | ||
}) | ||
}) |
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,27 +1,28 @@ | ||
import prefix from '../src/prefix'; | ||
/* global describe, it, expect */ | ||
|
||
describe('prefix', () => { | ||
it('should return an object on empty input', () => { | ||
expect(prefix()).toEqual({}); | ||
expect(prefix(null)).toEqual({}); | ||
expect(prefix({})).toEqual({}); | ||
}); | ||
import prefix from '../src/prefix' | ||
|
||
it('should add webkit prefix to correct properties', () => { | ||
expect(prefix({ | ||
width: '50px', | ||
transform: 1, | ||
transformOrigin: 2, | ||
transition: 3 | ||
})).toEqual({ | ||
width: '50px', | ||
WebkitTransform: 1, | ||
WebkitTransformOrigin: 2, | ||
WebkitTransition: 3, | ||
transform: 1, | ||
transformOrigin: 2, | ||
transition: 3 | ||
}); | ||
}); | ||
describe('prefix', () => { | ||
it('should return an object on empty input', () => { | ||
expect(prefix()).toEqual({}) | ||
expect(prefix(null)).toEqual({}) | ||
expect(prefix({})).toEqual({}) | ||
}) | ||
|
||
}); | ||
it('should add webkit prefix to correct properties', () => { | ||
expect(prefix({ | ||
width: '50px', | ||
transform: 1, | ||
transformOrigin: 2, | ||
transition: 3 | ||
})).toEqual({ | ||
width: '50px', | ||
WebkitTransform: 1, | ||
WebkitTransformOrigin: 2, | ||
WebkitTransition: 3, | ||
transform: 1, | ||
transformOrigin: 2, | ||
transition: 3 | ||
}) | ||
}) | ||
}) |
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
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.