Fix unit tests (#377)

* Fix unit tests

* Remove excess lint and prettier checks from gh actions
zio/stable
Paul Frazee 2023-04-03 12:11:06 -05:00 committed by GitHub
parent 70abcc48b8
commit 9d178c7e15
4 changed files with 6 additions and 15 deletions

View File

@ -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:

View File

@ -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,

View File

@ -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']]),
}))

View File

@ -187,7 +187,7 @@
], ],
"modulePathIgnorePatterns": [ "modulePathIgnorePatterns": [
"__tests__/.*/__mocks__", "__tests__/.*/__mocks__",
"e2e/.*" "__e2e__/.*"
], ],
"coveragePathIgnorePatterns": [ "coveragePathIgnorePatterns": [
"<rootDir>/node_modules/", "<rootDir>/node_modules/",