Peel-Organisation / Peel_Mobile

Peel is an innovative dating application inspired by Tinder in the way it works but doesn't rely on the promotion of physical appearance to attract its users, instead, it aims at creating genuine lasting sentimental relationships through various activities
0 stars 0 forks source link

Error with import {createNativeStackNavigation} #15

Open KevOneRedOne opened 1 year ago

KevOneRedOne commented 1 year ago

FAIL tests/App-test.js

● Test suite failed to run

/home/runner/work/Peel_Mobile/Peel_Mobile/node_modules/@react-navigation/elements/lib/commonjs/assets/back-icon.png:1
({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,global,jest){�PNG

SyntaxError: Invalid or unexpected token

  1 | import React from 'react';
> 2 | import {createNativeStackNavigator} from '@react-navigation/native-stack';
    | ^
  3 |
  4 | import AuthStack from '../stacks/authStack';
  5 | import PublicStack from '../stacks/publicStack';

  at Runtime.createScriptFromCode (node_modules/jest-runtime/build/index.js:1350:14)
  at Object.<anonymous> (node_modules/@react-navigation/elements/src/index.tsx:20:3)
  at Object.<anonymous> (node_modules/@react-navigation/native-stack/src/views/NativeStackView.native.tsx:1:1)
  at Object.<anonymous> (node_modules/@react-navigation/native-stack/src/navigators/createNativeStackNavigator.tsx:1[9](https://github.com/Peel-Organisation/Peel_Mobile/actions/runs/5039202420/jobs/9037190176#step:4:10):1)
  at Object.<anonymous> (node_modules/@react-navigation/native-stack/src/index.tsx:4:1)
  at Object.<anonymous> (src/config/routes.js:2:1)
  at Object.<anonymous> (App.js:4:1)
  at Object.<anonymous> (__tests__/App-test.js:7:1)

Test Suites: 1 failed, 1 total Tests: 0 total Snapshots: 0 total Time: 6.194 s Ran all test suites. Error: Process completed with exit code 1.

### - commit 1ce8bfb3c92e467963b9a069844f519e99c1cb7d to fix that

KevOneRedOne commented 1 year ago

### After a fix, new error on this commit : aee783604d13523b56099436c4d2f0768fb6aaa8

Peel@0.0.1 test jest

FAIL tests/App-test.js ● Test suite failed to run

C:\2 - VSCode_Projet\Ydays\B3\Peel_Mobile\node_modules\@react-native\polyfills\error-guard.js:14
type ErrorHandler = (error: mixed, isFatal: boolean) => void;
     ^^^^^^^^^^^^

SyntaxError: Unexpected identifier

  at Runtime.createScriptFromCode (node_modules/jest-runtime/build/index.js:1350:14)
  at Object.<anonymous> (node_modules/react-native/jest/setup.js:406:6)

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