Skip to content

Commit

Permalink
unit tests (#353)
Browse files Browse the repository at this point in the history
* unit tests

* test functions

* functions tests

* android permissions and b64 tests

* ts fix, improve tests

* handle clearCachedCredentials exceptional method

* useStripeTerminala more unit tests

* typo fix
  • Loading branch information
arekkubaczkowski authored and jdivock-stripe committed Aug 31, 2022
1 parent 25564e5 commit 3613b2e
Show file tree
Hide file tree
Showing 17 changed files with 1,750 additions and 23 deletions.
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
"@expo/config-plugins": "^4.0.18",
"@react-native-community/bob": "^0.16.2",
"@react-native-community/eslint-config": "^2.0.0",
"@testing-library/react-native": "^10.0.0",
"@types/base-64": "^1.0.0",
"@types/jest": "^27.0.2",
"@types/react": "^16.9.19",
Expand All @@ -73,6 +74,7 @@
"prettier": "^2.0.5",
"react": "17.0.2",
"react-native": "0.68.2",
"react-test-renderer": "17.0.2",
"stripe": "^7.14.0",
"typedoc": "^0.22.15",
"typescript": "^4.6.2"
Expand Down
42 changes: 42 additions & 0 deletions src/__tests__/__snapshots__/functions.test.ts.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`functions.test.ts Functions snapshot ensure there are no unexpected changes to the functions exports 1`] = `
Object {
"cancelCollectPaymentMethod": [Function],
"cancelCollectRefundPaymentMethod": [Function],
"cancelCollectSetupIntent": [Function],
"cancelDiscovering": [Function],
"cancelInstallingUpdate": [Function],
"cancelPaymentIntent": [Function],
"cancelReadReusableCard": [Function],
"cancelSetupIntent": [Function],
"clearCachedCredentials": [Function],
"clearReaderDisplay": [Function],
"collectPaymentMethod": [Function],
"collectRefundPaymentMethod": [Function],
"collectSetupIntentPaymentMethod": [Function],
"confirmSetupIntent": [Function],
"connectBluetoothReader": [Function],
"connectEmbeddedReader": [Function],
"connectHandoffReader": [Function],
"connectInternetReader": [Function],
"connectLocalMobileReader": [Function],
"connectUsbReader": [Function],
"createPaymentIntent": [Function],
"createSetupIntent": [Function],
"disconnectReader": [Function],
"discoverReaders": [Function],
"getLocations": [Function],
"initialize": [Function],
"installAvailableUpdate": [Function],
"processPayment": [Function],
"processRefund": [Function],
"readReusableCard": [Function],
"retrievePaymentIntent": [Function],
"retrieveSetupIntent": [Function],
"setConnectionToken": [Function],
"setReaderDisplay": [Function],
"setSimulatedCard": [Function],
"simulateReaderUpdate": [Function],
}
`;
File renamed without changes.
Loading

0 comments on commit 3613b2e

Please sign in to comment.