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