Fix unit tests (#377)
* Fix unit tests * Remove excess lint and prettier checks from gh actionszio/stable
parent
70abcc48b8
commit
9d178c7e15
|
@ -18,11 +18,6 @@ jobs:
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
- name: Yarn install
|
- name: Yarn install
|
||||||
run: yarn
|
run: yarn
|
||||||
- name: Lint Reporter
|
|
||||||
uses: wearerequired/lint-action@v2.2.0
|
|
||||||
with:
|
|
||||||
eslint: true
|
|
||||||
prettier: true
|
|
||||||
- name: Typescript & Lint check
|
- name: Typescript & Lint check
|
||||||
run: yarn lint
|
run: yarn lint
|
||||||
testing:
|
testing:
|
||||||
|
|
|
@ -73,13 +73,10 @@ describe('getLinkMeta', () => {
|
||||||
{
|
{
|
||||||
likelyType: LikelyType.AtpData,
|
likelyType: LikelyType.AtpData,
|
||||||
url: '/',
|
url: '/',
|
||||||
title: 'Bluesky',
|
|
||||||
description: 'A new kind of social network',
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
likelyType: LikelyType.AtpData,
|
likelyType: LikelyType.AtpData,
|
||||||
url: '/index.html',
|
url: '/index.html',
|
||||||
title: 'Not found',
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
likelyType: LikelyType.Other,
|
likelyType: LikelyType.Other,
|
||||||
|
|
|
@ -43,12 +43,6 @@ jest.mock('@bam.tech/react-native-image-resizer', () => ({
|
||||||
createResizedImage: jest.fn(),
|
createResizedImage: jest.fn(),
|
||||||
}))
|
}))
|
||||||
|
|
||||||
import {View as mockedView} from 'react-native'
|
|
||||||
jest.mock('react-native-tab-view', () => ({
|
|
||||||
...jest.requireActual('react-native-tab-view'),
|
|
||||||
TabView: mockedView,
|
|
||||||
}))
|
|
||||||
|
|
||||||
jest.mock('@segment/analytics-react-native', () => ({
|
jest.mock('@segment/analytics-react-native', () => ({
|
||||||
createClient: () => ({
|
createClient: () => ({
|
||||||
add: jest.fn(),
|
add: jest.fn(),
|
||||||
|
@ -75,3 +69,8 @@ jest.mock('expo-media-library', () => ({
|
||||||
default: jest.fn(),
|
default: jest.fn(),
|
||||||
usePermissions: jest.fn(() => [true]),
|
usePermissions: jest.fn(() => [true]),
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
jest.mock('lande', () => ({
|
||||||
|
__esModule: true, // this property makes it work
|
||||||
|
default: jest.fn().mockReturnValue([['eng']]),
|
||||||
|
}))
|
||||||
|
|
|
@ -187,7 +187,7 @@
|
||||||
],
|
],
|
||||||
"modulePathIgnorePatterns": [
|
"modulePathIgnorePatterns": [
|
||||||
"__tests__/.*/__mocks__",
|
"__tests__/.*/__mocks__",
|
||||||
"e2e/.*"
|
"__e2e__/.*"
|
||||||
],
|
],
|
||||||
"coveragePathIgnorePatterns": [
|
"coveragePathIgnorePatterns": [
|
||||||
"<rootDir>/node_modules/",
|
"<rootDir>/node_modules/",
|
||||||
|
|
Loading…
Reference in New Issue