Skip to content

Commit 64daee5

Browse files
Damian SznajderDamian Sznajder
authored andcommitted
⬆️ Update dev Dependencies
1 parent a510972 commit 64daee5

File tree

4 files changed

+114
-752
lines changed

4 files changed

+114
-752
lines changed

__tests__/index.test.tsx

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,11 @@ Keyboard.dismiss = jest.fn()
1010
describe('<OtpInputs />', () => {
1111
const wrapper = renderer.create(<OtpInputs />)
1212

13-
test('render', done => {
13+
test('render', () => {
1414
expect(wrapper.toJSON()).toMatchSnapshot()
1515
expect(wrapper.root.findAllByType(OtpInput).length).toEqual(4)
1616
const sixInputsWrapper = renderer.create(<OtpInputs numberOfInputs={6} />)
1717
expect(sixInputsWrapper.root.findAllByType(OtpInput).length).toEqual(6)
18-
done()
1918
})
2019

2120
test('rendering with error', () => {
@@ -136,21 +135,25 @@ describe('<OtpInputs />', () => {
136135
describe('OtpInput events', () => {
137136
const wrapper = renderer.create(<OtpInputs />)
138137

139-
describe('handleBackspace', () => {
140-
const wrapperInstance = wrapper.getInstance()
141-
wrapperInstance._handleBackspace = jest.fn()
142-
const OtpInputComponent = wrapper.root.findAllByType(OtpInput)[0]
138+
describe('_handleBackspace', () => {
139+
test('should call handleBaspace function when OtpInput calls it', () => {
140+
const wrapperInstance = wrapper.getInstance()
141+
wrapperInstance._handleBackspace = jest.fn()
142+
const OtpInputComponent = wrapper.root.findAllByType(OtpInput)[0]
143143

144-
OtpInputComponent.props.handleBackspace()
145-
expect(wrapperInstance._handleBackspace).toBeCalled()
144+
OtpInputComponent.props.handleBackspace()
145+
expect(wrapperInstance._handleBackspace).toBeCalled()
146+
})
146147
})
147148

148149
describe('updateText', () => {
149-
const wrapperInstance = wrapper.getInstance()
150-
wrapperInstance._updateText = jest.fn()
151-
const OtpInputComponent = wrapper.root.findAllByType(OtpInput)[0]
150+
test('should call updateText function when OtpInput calls it', () => {
151+
const wrapperInstance = wrapper.getInstance()
152+
wrapperInstance._updateText = jest.fn()
153+
const OtpInputComponent = wrapper.root.findAllByType(OtpInput)[0]
152154

153-
OtpInputComponent.props.updateText()
154-
expect(wrapperInstance._updateText).toBeCalled()
155+
OtpInputComponent.props.updateText()
156+
expect(wrapperInstance._updateText).toBeCalled()
157+
})
155158
})
156159
})

package.json

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,19 +48,17 @@
4848
"devDependencies": {
4949
"@babel/core": "7.4.4",
5050
"@babel/preset-typescript": "7.3.3",
51-
"@react-native-community/bob": "0.3.4",
52-
"@types/jest": "24.0.11",
53-
"@types/lodash.flatten": "4.4.6",
54-
"@types/react": "16.8.14",
55-
"@types/react-native": "0.57.50",
51+
"@react-native-community/bob": "0.4.1",
52+
"@types/jest": "24.0.12",
53+
"@types/react": "16.8.15",
54+
"@types/react-native": "0.57.51",
5655
"@types/react-test-renderer": "16.8.1",
57-
"husky": "2.1.0",
56+
"husky": "2.2.0",
5857
"jest": "24.7.1",
59-
"metro-react-native-babel-preset": "0.53.1",
6058
"react": "16.8.3",
6159
"react-native": "0.59.5",
6260
"react-test-renderer": "16.8.3",
63-
"release-it": "10.4.4",
61+
"release-it": "11.0.1",
6462
"rimraf": "2.6.3",
6563
"tslint": "5.16.0",
6664
"typescript": "3.4.5"

tsconfig.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
"noImplicitReturns": true,
1111
"noUnusedLocals": true,
1212
"noUnusedParameters": true,
13-
"outDir": "dist",
1413
"skipLibCheck": true,
1514
"sourceMap": true
1615
},

0 commit comments

Comments
 (0)