callstack / callstack/reassure
[BUG] TypeError: Object.defineProperty called on non-object
- Dominant language
- TypeScript
- Stars
- 1.5k
- Forks
- 38
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
I've stepped through the (very simple) setup instructions, with a view to add a POC to our project, but i'm met with the following error when the test runs;
```js
app/screens/Authentication/LoginScreen/__tests__/LoginScreen.perf-test.tsx
● Test suite failed to run
TypeError: Object.defineProperty called on non-object
at Function.defineProperty ()
> 1 | import { measureRenders } from 'reassure'
| ^
2 |
3 | import LoginScreen from '../LoginScreen'
4 |
at defineProperty (node_modules/mathjs/lib/cjs/type/complex/Complex.js:19:10)
at create (node_modules/mathjs/lib/cjs/utils/factory.js:45:12)
at Object. (node_modules/mathjs/lib/cjs/entry/pureFunctionsAny.generated.js:20:84)
at Object.require (node_modules/mathjs/lib/cjs/entry/mainAny.js:51:34)
at Object.require (node_modules/mathjs/lib/cjs/index.js:6:16)
at Object.require (node_modules/@callstack/reassure-measure/src/measure-helpers.tsx:1:1)
at Object.require (node_modules/@callstack/reassure-measure/src/measure-renders.tsx:4:1)
at Object.require (node_modules/@callstack/reassure-measure/src/index.ts:2:1)
at Object.require (node_modules/reassure/src/index.ts:1:1)
at Object.require (app/screens/Authentication/LoginScreen/__tests__/LoginScreen.perf-test.tsx:1:1)
at asyncGeneratorStep (node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:24)
at asyncGeneratorStep (node_modules/@babel/runtime/helpers/asyncToGenerator.js:22:9)
```
The test simply looks like;
```js
import { measureRenders } from 'reassure'
import LoginScreen from '../LoginScreen'
test('Simple test', async () => {
await measureRenders()
})
```
**To Reproduce**
Steps to reproduce the behavior:
1. followed the setup instructions but installing `reassure`
2. Jest already setup and functional with `@testing-library/react-native`
**Expected behavior**
Tests should run in cli
Contributor guide
Assessment
This issue has not been assessed yet.