I am using quasar for developing a vue app. I am using vue 3.0.7. I have installed jest and created the jest.config File.
The jest config file contains the following:
clearMocks: true,
moduleFileExtensions: [
"js",
"jsx",
"ts",
"vue"
],
testMatch: [
"**/__tests__/**/*.[jt]s?(x)",
"**/?(*.)+(spec|test).[tj]s?(x)"
],
transform: {
"^.+\\.js$": "babel-jest",
".*\\.(vue)$": "vue-jest"
},
transformIgnorePatterns: [
"\\\\node_modules\\\\",
"\\.pnp\\.[^\\\\]+$"
],
I am writing the following test for a demo vue component:
import { shallowMount} from "#vue/test-utils"
import ComponentVueTest from "./ComponentVueTest"
describe('ComponentVueTest', ()=>{
test("Text shoudl be in the html" , () => {
let wrapper = shallowMount(ComponentVueTest);
expect(wrapper.html).toContain('JustTesting');
})
})
The component that is being tested:
<template>
JustTesting
</template>
<script>
import { defineComponent } from '#vue/composition-api'
export default defineComponent({
setup() {
},
})
</script>
<style>
</style>
and also the package.json dependencies:
"dependencies": {
"#quasar/extras": "^1.0.0",
"#typescript-eslint/eslint-plugin": "^4.29.1",
"#typescript-eslint/parser": "^4.29.1",
"#vue/composition-api": "^1.0.6",
"cordova": "^10.0.0",
"core-js": "^3.6.5",
"quasar": "^2.0.0",
"vue": "^2.6.14",
"vue-loader": "^16.5.0",
"vue-template-compiler": "^2.6.14"
},
"devDependencies": {
"#babel/core": "^7.15.0",
"#babel/eslint-parser": "^7.13.14",
"#babel/preset-env": "^7.15.0",
"#quasar/app": "^3.0.0",
"#quasar/quasar-app-extension-testing": "^1.0.3",
"#quasar/quasar-app-extension-testing-unit-jest": "^2.2.2",
"#vue/test-utils": "^2.0.0-rc.12",
"babel-core": "^7.0.0-bridge.0",
"babel-jest": "^27.0.6",
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.1.0",
"eslint-plugin-jest": "^24.1.0",
"eslint-plugin-vue": "^7.0.0",
"eslint-webpack-plugin": "^2.4.0",
"jest": "^27.0.6",
"vue-jest": "^3.0.7"
},
When i run the npm run test ("test": "npx jest") i get the following error:
FAIL src/__tests__/Demo.spec.js
● Test suite failed to run
TypeError: Vue.defineComponent is not a function
> 1 | import { shallowMount} from "#vue/test-utils"
| ^
2 | import ComponentVueTest from "./ComponentVueTest"
3 |
4 | describe('ComponentVueTest', ()=>{
at Object.<anonymous> (node_modules/#vue/test-utils/dist/vue-test-utils.cjs.js:7856:26)
at Object.<anonymous> (src/__tests__/Demo.spec.js:1:1)
I have been trying for hours to fix it and can't seem to understand what is wrong
Try changing:
import { defineComponent } from '#vue/composition-api' to
import { defineComponent } from 'vue'
Also looks like you need to change your wrapper.html to wrapper.text() and add toMatch rather than toContain, that said the following should work:
import { shallowMount} from "#vue/test-utils"
import ComponentVueTest from "./ComponentVueTest"
describe('ComponentVueTest', ()=>{
test("Text should be in the html" , () => {
let wrapper = shallowMount(ComponentVueTest);
expect(wrapper.text()).toMatch('JustTesting');
})
})
The solution to unit testing vue3 in quasar v2 is to use #quasar/quasar-app-extension-testing-unit-jest. Just install it with
quasar ext add #quasar/quasar-app-extension-testing-unit-jest
and it should set up everything for you. Notice it is still in alpha and some components are not fully working yet(for me QPage wasn't working).
Hope this helps somebody :)
Related
I'm trying to run unit test for composition-api component. I'm on Vue 2.7 with TS and the following packages:
"nuxt": "^2.15.8",
"#nuxtjs/composition-api": "^0.33.1",
"#vue/test-utils": "^1.3.0",
"jest": "^28.1.3",
The issue is the following error is thrown on component mount:
SyntaxError: Unexpected token (1:1141)
at Parser.pp$4.raise (node_modules/vue-template-es2015-compiler/buble.js:2757:13)
at Parser.pp.unexpected (node_modules/vue-template-es2015-compiler/buble.js:647:8)
at Parser.pp$3.parseExprAtom (node_modules/vue-template-es2015-compiler/buble.js:2196:10)
at Parser.<anonymous> (node_modules/vue-template-es2015-compiler/buble.js:6003:24)
at Parser.parseExprAtom (node_modules/vue-template-es2015-compiler/buble.js:6129:31)
at Parser.pp$3.parseExprSubscripts (node_modules/vue-template-es2015-compiler/buble.js:2047:19)
at Parser.pp$3.parseMaybeUnary (node_modules/vue-template-es2015-compiler/buble.js:2024:17)
at Parser.pp$3.parseExprOps (node_modules/vue-template-es2015-compiler/buble.js:1966:19)
at Parser.pp$3.parseMaybeConditional (node_modules/vue-template-es2015-compiler/buble.js:1949:19)
at Parser.pp$3.parseMaybeAssign (node_modules/vue-template-es2015-compiler/buble.js:1925:19)
The test example:
import { mount, createLocalVue } from '#vue/test-utils';
import CompositionApi from '#nuxtjs/composition-api';
import CustomSelect from '#/components/shared/CustomSelect';
import Vuetify from 'vuetify';
const localVue = createLocalVue();
localVue.use(CompositionApi);
let vuetify;
beforeEach(() => {
jest.clearAllMocks();
vuetify = new Vuetify();
});
describe('test select component', () => {
test('Mounts correclty', () => {
const wrapper = mount(CustomSelect, {
localVue,
vuetify,
});
expect(wrapper.vm).toBeTruthy();
});
});
The config:
// jest.config.js
module.exports = {
globalSetup: '<rootDir>/jest.setup.js',
setupFiles: ['<rootDir>/tests/jest.init.js'],
testEnvironment: 'jsdom',
moduleNameMapper: {
'^#/(.*)$': '<rootDir>/$1',
'^~/(.*)$': '<rootDir>/$1',
'^vue$': 'vue/dist/vue.common.js',
'^#nuxtjs/composition-api$':
'#nuxtjs/composition-api/dist/runtime/index.js',
},
moduleFileExtensions: ['js', 'vue', 'json'],
transform: {
'^.+\\.js$': 'babel-jest',
'.*\\.(vue)$': 'vue-jest',
'^.+\\.ts?$': 'ts-jest',
'.+\\.(css|sass|scss|png|jpg|ttf|woff|woff2)$': 'jest-transform-stub',
},
transformIgnorePatterns: [
'<rootDir>/node_modules/(?!(#nuxtjs/composition-api)/)',
],
snapshotSerializers: ['jest-serializer-vue'],
testMatch: ['<rootDir>/tests/unit/**/*.spec.js'],
};
package.json
{
.....
"test": "jest",
"test:watch": "jest --watch",
.....
},
"engines": {
"npm": "8.11",
"node": "16.16"
},
"dependencies": {
.....
"#babel/eslint-parser": "^7.18.9",
"#nuxt/types": "^2.15.8",
"#nuxt/typescript-build": "^2.1.0",
"#nuxtjs/composition-api": "^0.33.1",
"#nuxtjs/vuetify": "^1.12.3",
"#vueuse/core": "^9.3.1",
"flush-promises": "^1.0.2",
"jest-environment-jsdom": "^28.1.3",
"jest-mock-axios": "^4.7.0-beta",
"nuxt": "^2.15.8",
.....
},
"devDependencies": {
.....
"#babel/core": "^7.19.1",
"#babel/preset-env": "^7.19.1",
"#faker-js/faker": "^7.6.0",
"#vue/server-test-utils": "^1.3.0",
"#vue/test-utils": "^1.3.0",
"babel-core": "^7.0.0-bridge.0",
"babel-jest": "^28.1.3",
"eslint": "^8.20.0",
"jest": "^28.1.3",
"jest-cli": "^28.1.3",
"jest-serializer-vue": "^2.0.2",
"jest-transform-stub": "^2.0.0",
"mockdate": "^3.0.2",
"vue-jest": "^3.0.7"
.....
}
}
I've tried all the suggestions from Jest docs, including: specifying "transformIgnorePatterns", specifying "moduleNameMapper", enabling "ECMAScript Modules" but it won't help.
What should be the working setup to test composition-api components on Vue 2.7 + Nuxt + Vuetify?
I using Jest 27.5.1 with TypeScript.
When I try to test, I got these error:
● Test suite failed to run
TypeError: Cannot read properties of undefined (reading 'extend')
2 | <div>Hello</div>
3 | </template>
> 4 |
| ^
5 | <script lang="ts">
6 | import Vue from 'vue'
7 | export default Vue.extend({
at src/pages/test.vue:4:1
at Object.<anonymous> (src/pages/test.vue:347:3)
at Object.<anonymous> (test/test.spec.ts:4:1)
at TestScheduler.scheduleTests (node_modules/#jest/core/build/TestScheduler.js:333:13)
at runJest (node_modules/#jest/core/build/runJest.js:404:19)
at _run10000 (node_modules/#jest/core/build/cli/index.js:320:7)
at runCLI (node_modules/#jest/core/build/cli/index.js:173:3)
files
test file(TypeScript):
import Vuetify from 'vuetify'
import { mount, createLocalVue } from '#vue/test-utils'
import test from '~/src/pages/test.vue'
const localVue = createLocalVue()
describe('Index', () => {
let vuetify: Vuetify
beforeEach(() => {
vuetify = new Vuetify()
})
test('is a Vue instance', () => {
const wrapper = mount(test, {
vuetify,
localVue,
})
expect(wrapper.vm).toBeTruthy()
})
})
jest.config.js:
module.exports = {
moduleNameMapper: {
'^#/(.*)$': '<rootDir>/$1',
'^~/(.*)$': '<rootDir>/$1',
'^vue$': 'vue/dist/vue.common.js',
},
moduleFileExtensions: ['ts', 'js', 'vue', 'json'],
transform: {
'^.+\\.ts$': 'ts-jest',
'^.+\\.js$': 'babel-jest',
'.*\\.(vue)$': 'vue-jest',
},
collectCoverage: true,
collectCoverageFrom: [
'<rootDir>/src/components/**/*.vue',
'<rootDir>/src/pages/**/*.vue',
],
testEnvironment: 'jsdom',
setupFilesAfterEnv: ['./test/setup.js'],
moduleDirectories: [__dirname, 'node_modules']
}
setup.js:
import Vue from 'vue'
import Vuetify from 'vuetify'
Vue.use(Vuetify)
package.json:
"dependencies": {
"#babel/core": "^7.19.3",
"#nuxtjs/axios": "^5.13.6",
"consola": "^2.15.3",
"core-js": "^3.19.3",
"dotenv": "^16.0.2",
"eslint": "^8.22.0",
"eslint-plugin-import": "^2.26.0",
"nuxt": "^2.15.8",
"nuxt-typed-vuex": "^0.3.1",
"ts-loader": "8.2.0",
"typed-vuex": "^0.3.1",
"typescript": "^4.8.4",
"vue": "^2.7.10",
"vue-server-renderer": "^2.6.14",
"vue-template-compiler": "^2.6.14",
"vuetify": "^2.6.10",
"vuex": "3.6.2",
"webpack": "^4.46.0"
},
"devDependencies": {
"#babel/eslint-parser": "^7.16.5",
"#nuxt/types": "^2.15.8",
"#nuxt/typescript-build": "^2.1.0",
"#nuxtjs/eslint-config-typescript": "^8.0.0",
"#nuxtjs/eslint-module": "^3.0.2",
"#nuxtjs/stylelint-module": "^4.1.0",
"#nuxtjs/vuetify": "^1.12.3",
"#types/jest": "^27.5.2",
"#types/node": "^18.7.18",
"#typescript-eslint/eslint-plugin": "^5.35.1",
"#typescript-eslint/parser": "^5.35.1",
"#vue/cli-plugin-unit-jest": "^5.0.8",
"#vue/test-utils": "^1.3.0",
"babel-core": "7.0.0-bridge.0",
"babel-jest": "^27.5.1",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-nuxt": "^3.1.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-vue": "^8.2.0",
"husky": "^8.0.1",
"jest": "^27.5.1",
"lint-staged": "^12.1.7",
"postcss-html": "^1.3.1",
"prettier": "^2.7.1",
"stylelint": "^14.1.0",
"stylelint-config-prettier": "^9.0.3",
"stylelint-config-recommended-vue": "^1.1.0",
"stylelint-config-standard": "^24.0.0",
"ts-jest": "^27.1.5",
"vue-jest": "^3.0.7"
}
What do I have to do to run the test correctly?
I don't know how to solve this problem myself, as it worked fine when I ran the same code in other environments.
Thank you for your help.
Mh seems the Vue instance cannot be reached. I'm also using vuetify with jest test and it look quite same. Also same as in the documentation by vuetify here https://vuetifyjs.com/en/getting-started/unit-testing/#spec-tests
The only difference I see is that the createLocalVue() initialization is outside of describe() in your case.
Try it like
describe('Index', () => {
let vuetify: Vuetify
const localVue = createLocalVue()
...
Instead of
const localVue = createLocalVue()
describe('Index', () => {
let vuetify: Vuetify
...
I'm using vue-template-loader to load html files in .ts files using decorators, before I use it vuetify was working fine, but after I installed it I got these error messages
[Vue warn]: Unknown custom element: <v-img> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
[Vue warn]: Unknown custom element: <v-spacer> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
[Vue warn]: Unknown custom element: <v-btn> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
Basically: it says that vuetify is not in your app
vuetify.ts
import Vue from 'vue';
import Vuetify from 'vuetify/lib/framework';
// Locals
import ar from 'vuetify/src/locale/ar';
import en from 'vuetify/src/locale/en';
Vue.use(Vuetify);
export default new Vuetify({
rtl: true,
lang: {
locales: { ar, en },
current: 'ar',
}
});
vue.config.js
const { defineConfig } = require('#vue/cli-service');
module.exports = defineConfig({
transpileDependencies: ['vuetify'],
configureWebpack: {
module: {
rules: [
{
test: /.html$/,
loader: 'vue-template-loader',
exclude: /index.html/,
},
],
}
},
});
package.json
{
"dependencies": {
"core-js": "^3.8.3",
"moment": "^2.29.3",
"register-service-worker": "^1.7.2",
"vue": "^2.6.14",
"vue-class-component": "^7.2.3",
"vue-i18n": "^8.27.1",
"vue-property-decorator": "^9.1.2",
"vue-router": "^3.5.1",
"vuetify": "^2.6.0",
},
"devDependencies": {
"#vue/cli-plugin-babel": "~5.0.0",
"#vue/cli-plugin-e2e-cypress": "~5.0.0",
"#vue/cli-plugin-pwa": "~5.0.0",
"#vue/cli-plugin-router": "~5.0.0",
"#vue/cli-plugin-typescript": "~5.0.0",
"#vue/cli-service": "~5.0.0",
"jest": "^27.0.5",
"sass": "^1.32.7",
"sass-loader": "^12.0.0",
"typescript": "~4.5.5",
"vue-cli-plugin-vuetify": "~2.5.0",
"vue-template-loader": "^1.1.0",
"vuetify-loader": "^1.7.0"
}
}
I have a problem with fire the Jest tests for the Nuxt/Vue components. Last day i connected all that need for test, and had resolve many errors with jsdom and babel issues, but can't resolve problem with Vue component.
The error is
TypeError: Cannot read property 'child' of undefined
4 | describe('Компонент Counter', () => {
5 | test("renders properly", () => {
> 6 | const wrapper = shallowMount(Greeting); // or mount - it's doesn't metter
| ^
7 | console.log(wrapper);
8 | });
9 |
My comoponent Greeting
<template>
<div> Hello World! </div>
</template>
<script>
export default {
name: 'Greeting'
};
</script>
My Greeting.spec.js
import {mount, shallowMount} from '#vue/test-utils';
import Greeting from '../../components/Greeting.vue';
require('jsdom-global')();
describe('Компонент Counter', () => {
test("renders properly", () => {
const wrapper = shallowMount(Greeting);
console.log(wrapper);
});
});
jest.config.js
module.exports = {
moduleFileExtensions: ["js", "json", "vue"],
watchman: false,
preset: "#nuxt/test-utils",
transform: {
"^.+\\.js$": "babel-jest",
".*\\.(vue)$": "#vue/vue2-jest"
},
};
package.json
"scripts": {
"test": "jest"
},
"devDependencies": {
"#nuxt/test-utils": "^0.2.2",
"#types/jest": "^27.0.3",
"#vue/cli-plugin-babel": "^4.5.15",
"#vue/test-utils": "^1.3.0",
"#vue/vue2-jest": "^27.0.0-alpha.4",
"babel-core": "^7.0.0-bridge.0",
"babel-eslint": "^8.2.1",
"babel-jest": "^27.4.5",
"eslint": "^4.15.0",
"eslint-friendly-formatter": "^3.0.0",
"eslint-loader": "^1.7.1",
"eslint-plugin-vue": "^4.0.0",
"jest": "^27.4.5",
"jsdom-global": "^3.0.2",
"node-sass": "^4.7.2",
"pug": "^2.0.3",
"pug-plain-loader": "^1.0.0",
"sass-loader": "^6.0.7",
"ts-jest": "^27.1.2",
"vue": "^2.6.14",
"vue-jest": "^3.0.7",
"vue-template-compiler": "^2.6.14",
"vueify": "^9.4.1"
}
So the answer is that Jest have an attribute for working with JSDOM and i don't need an additional requires.
i just add in jest.config.js single line in the bottom
module.exports = {
moduleFileExtensions: ["js", "json", "vue"],
watchman: false,
preset: "#nuxt/test-utils",
transform: {
"^.+\\.js$": "babel-jest",
".*\\.(vue)$": "#vue/vue2-jest"
},
testEnvironment: 'jsdom'
};
I have been trying to find out how to fix the following error when trying to run my Jest test using React Native:
FAIL tests/App-test.js ● Test suite failed to run
/home/marijkebuurman/Desktop/sport-data-valley-questionnaire-app/node_modules/react-native/index.js:13
import typeof AccessibilityInfo from './Libraries/Components/AccessibilityInfo/AccessibilityInfo';
^^^^^^
SyntaxError: Cannot use import statement outside a module
at ScriptTransformer._transformAndBuildScript (node_modules/#jest/transform/build/ScriptTransformer.js:537:17)
at ScriptTransformer.transform (node_modules/#jest/transform/build/ScriptTransformer.js:579:25)
at Object.<anonymous> (node_modules/#react-navigation/native/lib/commonjs/useBackButton.tsx:3:1)
package.json
{
...
"dependencies": {
"#react-native-community/datetimepicker": "^2.3.2",
"#react-native-community/masked-view": "^0.1.8",
"#react-native-community/push-notification-ios": "^1.1.1",
"#react-native-firebase/app": "^6.7.1",
"#react-native-firebase/auth": "^6.7.1",
"#react-native-firebase/firestore": "^6.7.1",
"#react-navigation/bottom-tabs": "^5.2.6",
"#react-navigation/material-top-tabs": "^5.1.9",
"#react-navigation/native": "^5.1.5",
"#react-navigation/stack": "^5.2.10",
"axios": "^0.19.2",
"prop-types": "^15.7.2",
"react": "16.11.0",
"react-native": "0.62.2",
"react-native-background-fetch": "^3.0.5",
"react-native-elements": "^1.2.7",
"react-native-gesture-handler": "^1.6.1",
"react-native-image-picker": "^2.3.1",
"react-native-keychain": "^5.0.1",
"react-native-push-notification": "^3.1.9",
"react-native-reanimated": "^1.8.0",
"react-native-safe-area-context": "^0.7.3",
"react-native-screens": "^2.4.0",
"react-native-tab-view": "^2.14.0",
"react-native-vector-icons": "^6.6.0"
},
"devDependencies": {
"#babel/core": "^7.6.2",
"#babel/preset-flow": "^7.10.1",
"#babel/runtime": "^7.6.2",
"#bam.tech/react-native-make": "^2.0.0",
"#react-native-community/eslint-config": "^0.0.5",
"babel-core": "^7.0.0-bridge.0",
"babel-jest": "^23.4.2",
"babel-plugin-module-resolver": "^4.0.0",
"eslint": "^6.5.1",
"jest": "^24.9.0",
"metro-react-native-babel-preset": "^0.56.4",
"react-native-dotenv": "^0.2.0",
"react-test-renderer": "16.9.0"
},
"jest": {
"preset": "react-native",
"setupFiles": [
"./jest.setup.js"
],
"moduleNameMapper": {
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/__mocks__/fileMock.js",
"\\.(css|less)$": "<rootDir>/__mocks__/styleMock.js"
},
"transformIgnorePatterns": [
"node_modules/(?!(jest-)?react-native|react-navigation)"
]
}
}
I've tried to fix the problem in my package.json file by usingtransformIgnorePatterns to try and ignore react-navigation, but this hasn't worked.
.babelrc
{
"presets": [
"module:metro-react-native-babel-preset",
"module:react-native-dotenv",
"#babel/preset-flow"
],
"plugins": [
[
"module-resolver",
{
"cwd": "babelrc",
"root": [
"./src"
],
"extensions": [
".js",
".ios.js",
".android.js"
],
"alias": {
"api": "./src/api",
"assets": "./src/assets",
"services": "./src/services",
"styles": "./src/styles",
"components": "./src/components",
"app": "./src"
}
}
]
]
}
I've also installed and added #babel/preset-flow to the presets in my .babelrc file because I read somewhere this could help, but with no success.
My test
// import 'react-native';
import React from 'react';
import App from '../App';
// Note: test renderer must be required after react-native.
import renderer from 'react-test-renderer';
it('renders correctly', async () => {
renderer.create(<App />);
});
The test itself is pretty much the default provided React Native Jest test. I have commented the import statement for React Native as this was giving a similar error when running the test. When that line is uncommented the test still gives the error about AccessibilityInfo import statement, but there is no mention about #react-navigation but rather about ScriptTransformer.js.
My guess is that all this has something to do with my babel configuration, but I haven't been able to figure it out.
I've tried out a lot of changes to my .babelrc file, but I eventually fixed the error by converting my .babelrc file to a babel.config.js file that currently looks like this:
module.exports = function(api) {
api.cache(true);
return {
presets: [
'module:metro-react-native-babel-preset',
'module:react-native-dotenv',
'#babel/preset-flow',
],
plugins: [
[
'module-resolver',
{
root: ['./src'],
extensions: ['.js', '.ios.js', '.android.js'],
alias: {
api: './src/api',
assets: './src/assets',
services: './src/services',
styles: './src/styles',
components: './src/components',
app: './src',
},
},
],
['transform-class-properties'],
],
};
};
Aside from this I've added a lot of mocks inside my __mocks__ directory for different packages like for example react-native-firebase. I pretty sure that the mock files I added didn't have a part in fixing the error in my question, but there were other similar errors that were fixed by adding mock files.
By similar errors I mean errors that have an error message like:
SyntaxError: Cannot use import statement outside a module
In some cases, fixing this error requires adding the library, which the error complains about to the transformIgnorePatterns, which is in the file jest.config.js.
// jest.config.js
module.exports = {
preset: 'react-native',
setupFilesAfterEnv: [
// 1. specific setup for react-native
'#testing-library/jest-native/extend-expect',
// 2. global setup & mocking for some services:
'./jest.setup.js',
// 3. mocking for more services:
'./__mocks__/react-native-firebase.js',
"./__mocks__/#react-native-community/google-signin.ts",
],
// 4. You need to add the library to the RegEx below <- Problem Fix
// For example, if the error was related to "react-native-elements", you need to add it to the list (as shown below.)
transformIgnorePatterns: ["node_modules/(?!((jest-)?react-native|react-native-elements|#react-native(-community)?)/)"],
}
"react-native": "0.66.4"
"#testing-library/jest-native": "^4.0.4"
"#testing-library/react-native": "^9.0.0"
"babel-core": "^7.0.0-bridge.0"
"babel-jest": "^27.4.6"
"jest": "^27.4.7"
"metro-react-native-babel-preset": "^0.66.2"