mirror of
https://github.com/zoriya/react-native-web.git
synced 2026-06-05 11:19:34 +00:00
Remove type tests; fix code style
This commit is contained in:
+1
-1
@@ -133,7 +133,7 @@ class Example extends Component {
|
|||||||
onChangeText={(e) => { console.log('TextInput.onChangeText', e) }}
|
onChangeText={(e) => { console.log('TextInput.onChangeText', e) }}
|
||||||
onFocus={(e) => { console.log('TextInput.onFocus', e) }}
|
onFocus={(e) => { console.log('TextInput.onFocus', e) }}
|
||||||
/>
|
/>
|
||||||
<TextInput secureTextEntry={true} />
|
<TextInput secureTextEntry />
|
||||||
<TextInput keyboardType='numeric' />
|
<TextInput keyboardType='numeric' />
|
||||||
<TextInput keyboardType='tel' />
|
<TextInput keyboardType='tel' />
|
||||||
<TextInput keyboardType='url' />
|
<TextInput keyboardType='url' />
|
||||||
|
|||||||
@@ -2,14 +2,6 @@ import { omitProps, pickProps } from '.'
|
|||||||
import assert from 'assert'
|
import assert from 'assert'
|
||||||
|
|
||||||
suite('pickProps', () => {
|
suite('pickProps', () => {
|
||||||
test('interface', () => {
|
|
||||||
assert.throws(
|
|
||||||
() => { pickProps({}, true) },
|
|
||||||
TypeError,
|
|
||||||
'pickProps should throw if the second argument is not an array'
|
|
||||||
)
|
|
||||||
})
|
|
||||||
|
|
||||||
test('return value', () => {
|
test('return value', () => {
|
||||||
const obj = { a: 1, b: 2, c: { cc: { ccc: 3 } } }
|
const obj = { a: 1, b: 2, c: { cc: { ccc: 3 } } }
|
||||||
const props = [ 'a', 'b' ]
|
const props = [ 'a', 'b' ]
|
||||||
@@ -21,14 +13,6 @@ suite('pickProps', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
suite('omitProps', () => {
|
suite('omitProps', () => {
|
||||||
test('interface', () => {
|
|
||||||
assert.throws(
|
|
||||||
() => { omitProps({}, true) },
|
|
||||||
TypeError,
|
|
||||||
'omitProps should throw if the second argument is not an array'
|
|
||||||
)
|
|
||||||
})
|
|
||||||
|
|
||||||
test('return value', () => {
|
test('return value', () => {
|
||||||
const obj = { a: 1, b: 2, c: { cc: { ccc: 3 } } }
|
const obj = { a: 1, b: 2, c: { cc: { ccc: 3 } } }
|
||||||
const props = [ 'a', 'b' ]
|
const props = [ 'a', 'b' ]
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ export const assertProps = {
|
|||||||
|
|
||||||
accessible: function (Component) {
|
accessible: function (Component) {
|
||||||
// accessible
|
// accessible
|
||||||
let dom = renderToDOM(<Component accessible={true} />)
|
let dom = renderToDOM(<Component accessible />)
|
||||||
assert.equal(dom.getAttribute('aria-hidden'), null)
|
assert.equal(dom.getAttribute('aria-hidden'), null)
|
||||||
// not accessible
|
// not accessible
|
||||||
dom = renderToDOM(<Component accessible={false} />)
|
dom = renderToDOM(<Component accessible={false} />)
|
||||||
|
|||||||
Reference in New Issue
Block a user