Skip to content

Commit

Permalink
test passing a different type than text to input props, fix construct…
Browse files Browse the repository at this point in the history
…or of ResizableInput
  • Loading branch information
Eli Sherer committed Aug 31, 2017
1 parent eb5fa32 commit b623587
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"scripts": {
"start": "gulp",
"test": "mocha test/index.ls --compilers ls:livescript",
"coverage": "istanbul cover _mocha -- test/index.ls --require should --compilers ls:livescript",
"coverage": "istanbul cover node_modules/mocha/bin/_mocha -- test/index.ls --require should --compilers ls:livescript",
"coveralls": "istanbul cover _mocha -- test/index.ls --require should --compilers ls:livescript && cat coverage/lcov.info | coveralls"
},
"author": "Furqan Zafar",
Expand Down
4 changes: 3 additions & 1 deletion src/ResizableInput.ls
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ module.exports = class ResizableInput extends React.PureComponent
@default-props =
type: \text

constructor: ->
# constructor
(props) ->
super props
@autosize = @autosize.bind @
@focus = @focus.bind @
@blur = @blur.bind @
Expand Down
8 changes: 7 additions & 1 deletion test/common-tests.ls
Original file line number Diff line number Diff line change
Expand Up @@ -388,8 +388,14 @@ module.exports = (select-class) !->
click-option find-highlighted-option select
component-with-class-must-not-exist select, \react-selectize-reset-button-container

specify "must use text as default type of search field", ->
select = create-select!
input = get-input select
assert input.type == \text

specify "must pass props.inputProps to search field", ->
select = create-select do
input-props: disabled: true
input-props: { disabled: true, type: \tel }
input = get-input select
assert input.disabled == true
assert input.type == \tel

0 comments on commit b623587

Please sign in to comment.