Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Tests fail on Android ExpoExample

オープン
#177 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
42/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
android, react-native, typescript

調査の方向性

ExpoExample/tests/App.owl.tsx から始め、yarn && cd ExpoExample && yarn に続けて yarn owl:build:android と yarn owl:test:android を実行して再現します。Android のテストコマンドが react-native-owl の import をどのように解決するかを確認し、Jest のレポートを失敗時の出力と比較します。Android ExpoExample テストスイートがモジュール解決の失敗なしに実行され、結果を一貫して報告できれば完了です。

索引モデルが issue の本文から書いたものです。

説明

bug
Is there an existing issue for this?
  • I have searched the existing issues
Code of Conduct
  • I agree to follow this project's Code of Conduct
Code Sandbox link

No response

Bug report
Tried to run tests in react-native-owl/ExpoExample on Android.

May be a known issue: 
https://github.com/FormidableLabs/react-native-owl/issues/139#issuecomment-1526473064

Steps to reproduce:
1. Clone react-native-owl
2. yarn && cd ExpoExample && yarn
3. yarn owl:build:android
4. yarn owl:test:android

Error:
yarn run v1.22.22
$ yarn owl test --platform android
$ node ../dist/cli/index.js test --platform android
[OWL - CLI] Starting websocket server.
[OWL - CLI] Running tests on android.
Performing Streamed Install
[OWL - WebSocket] Listening on port 8123.
Success
  bash arg: -p
  bash arg: com.ExpoExample
  bash arg: -c
  bash arg: android.intent.category.LAUNCHER
  bash arg: 1
args: [-p, com.ExpoExample, -c, android.intent.category.LAUNCHER, 1]
 arg: "-p"
 arg: "com.ExpoExample"
 arg: "-c"
 arg: "android.intent.category.LAUNCHER"
 arg: "1"
data="com.ExpoExample"
data="android.intent.category.LAUNCHER"
Events injected: 1
## Network stats: elapsed time=13ms (0ms mobile, 0ms wifi, 13ms not connected)
[OWL - WebSocket] The server received a message: OWL Client Connected!
[OWL - CLI] (Tests mode) Will compare latest images with the baseline.
[OWL - CLI] Will set the jest root to /Users/pablogomez-echegaray/Documents/GitHub/react-native-owl/ExpoExample.
 FAIL  __tests__/App.owl.tsx
  ● Test suite failed to run

    Cannot find module 'react-native-owl' from '__tests__/App.owl.tsx'

    > 1 | import {
        | ^
      2 |   takeScreenshot,
      3 |   press,
      4 |   toExist,

      at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:306:11)
      at Object.<anonymous> (__tests__/App.owl.tsx:1:1)

Test Suites: 1 failed, 1 total
Tests:       0 total
Snapshots:   0 total
Time:        0.46 s, estimated 19 s
Ran all test suites.
Test results written to: .owl/report/jest-report.json
(node:72810) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
[OWL - CLI] Generating Report
[OWL - CLI] Report was built at /Users/pablogomez-echegaray/Documents/GitHub/react-native-owl/ExpoExample/.owl/report/index.html
[OWL - CLI] Tests completed on android.
Error: Command failed with exit code 1: jest --testMatch="**/?(*.)+(owl).[jt]s?(x)" --verbose --roots=/Users/pablogomez-echegaray/Documents/GitHub/react-native-owl/ExpoExample --runInBand --globals='{"OWL_CLI_ARGS":{"_":["test"],"platform":"android","p":"android","config":"./owl.config.json","c":"./owl.config.json","update":false,"u":false,"$0":"../dist/cli/index.js"}}' --json --outputFile=/Users/pablogomez-echegaray/Documents/GitHub/react-native-owl/ExpoExample/.owl/report/jest-report.json
    at makeError (/Users/pablogomez-echegaray/Documents/GitHub/react-native-owl/node_modules/execa/lib/error.js:60:11)
    at module.exports.sync (/Users/pablogomez-echegaray/Documents/GitHub/react-native-owl/node_modules/execa/index.js:194:17)
    at module.exports.commandSync (/Users/pablogomez-echegaray/Documents/GitHub/react-native-owl/node_modules/execa/index.js:235:15)
    at /Users/pablogomez-echegaray/Documents/GitHub/react-native-owl/dist/cli/run.js:211:54
    at step (/Users/pablogomez-echegaray/Documents/GitHub/react-native-owl/dist/cli/run.js:33:23)
    at Object.next (/Users/pablogomez-echegaray/Documents/GitHub/react-native-owl/dist/cli/run.js:14:53)
    at fulfilled (/Users/pablogomez-echegaray/Documents/GitHub/react-native-owl/dist/cli/run.js:5:58) {
  shortMessage: `Command failed with exit code 1: jest --testMatch="**/?(*.)+(owl).[jt]s?(x)" --verbose --roots=/Users/pablogomez-echegaray/Documents/GitHub/react-native-owl/ExpoExample --runInBand --globals='{"OWL_CLI_ARGS":{"_":["test"],"platform":"android","p":"android","config":"./owl.config.json","c":"./owl.config.json","update":false,"u":false,"$0":"../dist/cli/index.js"}}' --json --outputFile=/Users/pablogomez-echegaray/Documents/GitHub/react-native-owl/ExpoExample/.owl/report/jest-report.json`,
  command: `jest --testMatch="**/?(*.)+(owl).[jt]s?(x)" --verbose --roots=/Users/pablogomez-echegaray/Documents/GitHub/react-native-owl/ExpoExample --runInBand --globals='{"OWL_CLI_ARGS":{"_":["test"],"platform":"android","p":"android","config":"./owl.config.json","c":"./owl.config.json","update":false,"u":false,"$0":"../dist/cli/index.js"}}' --json --outputFile=/Users/pablogomez-echegaray/Documents/GitHub/react-native-owl/ExpoExample/.owl/report/jest-report.json`,
  escapedCommand: `jest "--testMatch=\\"**/?(*.)+(owl).[jt]s?(x)\\"" --verbose "--roots=/Users/pablogomez-echegaray/Documents/GitHub/react-native-owl/ExpoExample" --runInBand "--globals='{\\"OWL_CLI_ARGS\\":{\\"_\\":[\\"test\\"],\\"platform\\":\\"android\\",\\"p\\":\\"android\\",\\"config\\":\\"./owl.config.json\\",\\"c\\":\\"./owl.config.json\\",\\"update\\":false,\\"u\\":false,\\"$0\\":\\"../dist/cli/index.js\\"}}'" --json "--outputFile=/Users/pablogomez-echegaray/Documents/GitHub/react-native-owl/ExpoExample/.owl/report/jest-report.json"`,
  exitCode: 1,
  signal: undefined,
  signalDescription: undefined,
  stdout: undefined,
  stderr: undefined,
  failed: true,
  timedOut: false,
  isCanceled: false,
  killed: false
}

Specify --help for available options
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Interestingly, the report seems to say all the test passed and failed at the same time.

主要言語
TypeScript
スター
693
フォーク
27
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

FormidableLabs/react-native-owl のほかの issue

FormidableLabs/react-native-owl の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。