Skip to content

fix: setup project and cache yml #201

fix: setup project and cache yml

fix: setup project and cache yml #201

Triggered via pull request April 20, 2024 09:45
Status Failure
Total duration 42s
Artifacts

action_run_unit_test.yml

on: pull_request
unit-tests
34s
unit-tests
Fit to window
Zoom out
Zoom in

Annotations

3 errors and 1 warning
unit-tests
There was an error while running Jest.
unit-tests
Error: Command failed: npx jest --coverage FAIL src/__tests__/TextInput.test.tsx ● Test suite failed to run Jest encountered an unexpected token Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax. Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration. By default "node_modules" folder is ignored by transformers. Here's what you can do: • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it. • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config. • If you need a custom transformation specify a "transform" option in your config. • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option. You'll find more details and examples of these config options in the docs: https://jestjs.io/docs/configuration For information about custom transformations, see: https://jestjs.io/docs/code-transformation Details: /home/runner/work/rn-base-component/rn-base-component/node_modules/react-native-reanimated/lib/index.js:1 ({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,jest){import * as Animated from './Animated'; ^^^^^^ SyntaxError: Cannot use import statement outside a module 2 | import type {LayoutChangeEvent} from 'react-native' 3 | import {StyleSheet, TextInput as RNTextInput, TextInputProps as RNTextInputProperties} from 'react-native' > 4 | import Animated, {interpolate, useAnimatedStyle, useSharedValue, withTiming} from 'react-native-reanimated' | ^ 5 | import styled from 'styled-components/native' 6 | import {useTheme} from '../../hooks' 7 | import type {InputContainerProps, TextInputProps, TextInputRef} from './TextInput' at Runtime.createScriptFromCode (node_modules/jest-runtime/build/index.js:1505:14) at Object.require (src/components/TextInput/TextInputOutlined.tsx:4:1) at Object.require (src/components/TextInput/TextInput.tsx:11:1) at Object.<anonymous> (src/__tests__/TextInput.test.tsx:3:1) FAIL src/__tests__/Progress.test.tsx ● Test suite failed to run Jest encountered an unexpected token Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax. Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration. By default "node_modules" folder is ignored by transformers. Here's what you can do: • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it. • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config. • If you need a custom transformation specify a "transform" option in your config. • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option. You'll find more details and examples of these config options in the docs: https://jestjs.io/docs/configuration For information about custom transformations, see: https://jestjs.io/docs/code-transformation Details: /home/runner/work/rn-base-component/rn-base-component/node_modules/react-native-reanimated/lib/index.js:1 ({"Object.<anonymous>":function(module,exports,require,__dirname,__fi
unit-tests
Command failed: npx jest --coverage FAIL src/__tests__/TextInput.test.tsx ● Test suite failed to run Jest encountered an unexpected token Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax. Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration. By default "node_modules" folder is ignored by transformers. Here's what you can do: • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it. • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config. • If you need a custom transformation specify a "transform" option in your config. • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option. You'll find more details and examples of these config options in the docs: https://jestjs.io/docs/configuration For information about custom transformations, see: https://jestjs.io/docs/code-transformation Details: /home/runner/work/rn-base-component/rn-base-component/node_modules/react-native-reanimated/lib/index.js:1 ({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,jest){import * as Animated from './Animated'; ^^^^^^ SyntaxError: Cannot use import statement outside a module 2 | import type {LayoutChangeEvent} from 'react-native' 3 | import {StyleSheet, TextInput as RNTextInput, TextInputProps as RNTextInputProperties} from 'react-native' > 4 | import Animated, {interpolate, useAnimatedStyle, useSharedValue, withTiming} from 'react-native-reanimated' | ^ 5 | import styled from 'styled-components/native' 6 | import {useTheme} from '../../hooks' 7 | import type {InputContainerProps, TextInputProps, TextInputRef} from './TextInput' at Runtime.createScriptFromCode (node_modules/jest-runtime/build/index.js:1505:14) at Object.require (src/components/TextInput/TextInputOutlined.tsx:4:1) at Object.require (src/components/TextInput/TextInput.tsx:11:1) at Object.<anonymous> (src/__tests__/TextInput.test.tsx:3:1) FAIL src/__tests__/Progress.test.tsx ● Test suite failed to run Jest encountered an unexpected token Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax. Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration. By default "node_modules" folder is ignored by transformers. Here's what you can do: • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it. • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config. • If you need a custom transformation specify a "transform" option in your config. • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option. You'll find more details and examples of these config options in the docs: https://jestjs.io/docs/configuration For information about custom transformations, see: https://jestjs.io/docs/code-transformation Details: /home/runner/work/rn-base-component/rn-base-component/node_modules/react-native-reanimated/lib/index.js:1 ({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,
unit-tests
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, actions/setup-node@v3, actions/cache@v3, dkershner6/jest-coverage-commenter-action@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.