question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

RE: new project yarn test failed (error message:This promise must be present when running with -o.)

See original GitHub issue

Is this a bug report?

Maybe.

Environment

Environment: OS: macOS High Sierra 10.13.2 Node: 6.9.1 Yarn: 1.3.2 npm: 4.1.1 Watchman: 4.9.0 Xcode: Xcode 9.2 Build version 9C40b Android Studio: 2.2 AI-145.3537739

Packages: (wanted => installed) react: 16.0.0 => 16.0.0 react-native: 0.50.3 => 0.50.3

Steps to Reproduce

  1. create-react-native-app foo 2.cd foo 3.yarn test

Expected Behavior

The default App.test.js is running and show all passed.

Actual Behavior

error message:

Determining test suites to run…Error: This promise must be present when running with -o. at /Users/developer/Desktop/code/es6/rn/learnTest/node_modules/jest-cli/build/search_source.js:202:17

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8

github_iconTop GitHub Comments

1reaction
75341704commented, Jan 12, 2018

But If it is react project, steps below 1.create-react-app foo 2.cd foo 3.yarn test

The default App.test.js is working and show all passed.

Anyone have some idea abt it?

0reactions
jcollumcommented, Feb 26, 2018

This appears to have been fixed in 0.53.3

react-native init testBug
...
cd testBug/
npm test

> testBug@0.0.1 test /Users/justin/projects/testBug
> jest

 PASS  __tests__/App.js (5.853s)
  ✓ renders correctly (3691ms)

Test Suites: 1 passed, 1 total
Tests:       1 passed, 1 total
Snapshots:   0 total
Time:        6.87s
Ran all test suites.


Read more comments on GitHub >

github_iconTop Results From Across the Web

yarn test: all tests passed but returned "error Command failed ...
Answer: the error code was due to line coverage being below the value that I defined (90%). It already told me line coverage...
Read more >
@sa11y/jest - npm
Start using @sa11y/jest in your project by running `npm i ... APIs need to be registered with Jest before they can be used...
Read more >
Troubleshooting Guide - Pulumi
This guide covers common troubleshooting techniques when using Pulumi, such as tracing, manually editing deployments, and resolving common errors.
Read more >
Testing | RedwoodJS Docs
But tests are here to stay, and maybe Redwood can change some opinions ... Try running that code again and you should see...
Read more >
jest | Yarn - Package Manager
Works out of the box for any React project. Instant Feedback: Failed tests run first. Fast interactive mode can switch between running all...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found