Comments (6)
@TheAlmightyBob
Thank you for your answer. and I solved it.
I made two mistakes.
-
Optional entry point when running the test
Expo specifies the entry point of the app because it is App.js.
Also, the test file will be App.test.js. -
How to write App.test.js.
Initially I thought I would export App.js and use it in App.test.js.
But it wasn't.
App.test.js simply wrapped the render part of App.js in a Tester component.
Here is the working code.
https://github.com/hoshinaoshi/cavyTest
from cavy-cli.
@sabbir0179 Assuming your index.test.js
file is correctly configured to run the tests, did you reload the React Native app? When using the --skipbuild
option, the tests won't automatically run until you manually trigger a reload.
from cavy-cli.
@TheAlmightyBob
I have the same problem.
The detailed situation is like this.
pixielabs/cavy#195 (comment)
the tests won't automatically run until you manually trigger a reload.
How do you do this?
Run from CLI? or is it the Command + D in the React Native App?
from cavy-cli.
@hoshinaoshi cmd+D or cmd+R (or for Android emulator RR or cmd+M)
This isn't necessary if you don't use --skipbuild
, since building/running will start the tests, but using --skipbuild
just puts Cavy CLI in a passive mode listening for test results.
from cavy-cli.
Glad you got this sorted @hoshinaoshi :) and thanks for helping @TheAlmightyBob !
@hoshinaoshi - are there any parts of the documentation you think could be improved? I'm thinking a page specifically for Expo set up... we have a Custom Entry Point Guide but maybe this is too hidden away.
from cavy-cli.
@sabbir0179 - I'm closing this issue for now but please let me know whether you're still having trouble and I'll reopen.
from cavy-cli.
Related Issues (20)
- Add note re passing extra arguments in
- Using Cavy with multiple entry points HOT 3
- Android and iOS entry points HOT 4
- In progress results HOT 2
- Handle when Cavy never runs HOT 2
- Android CircleCI example
- Richer report file HOT 1
- Unable to use index.android.js entry point
- TeamCity support HOT 11
- Add Port Option HOT 1
- Quoted arguments are not passed through correctly HOT 2
- cavy hangs if you don't pass it a command
- Identifying test failures from command-line HOT 3
- cavy command for expo project HOT 2
- Usage with `npx`? HOT 2
- If you don't have a test entry point, it's not obvious that you need one or you need to fix your index.js
- Sample index.test.js should import `name` from app.json
- Cavy not testing all test case HOT 5
- cavy-cli init HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cavy-cli.