Skip to content

Commit

Permalink
2642: Fix for Steffen's linter :X
Browse files Browse the repository at this point in the history
  • Loading branch information
LeandraH committed Nov 4, 2024
1 parent 8687212 commit d5105ec
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 24 deletions.
18 changes: 6 additions & 12 deletions native/src/components/__tests__/EmbeddedOffers.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,14 @@ import { CategoryModel, OfferModel } from 'shared/api'
import render from '../../testing/render'
import EmbeddedOffers from '../EmbeddedOffers'

jest.mock('../SprungbrettOffer', () => {
const MockedSprungbrettOffer = ({ sprungbrettOffer }: { sprungbrettOffer: OfferModel }) => {
const { Text } = require('react-native')
return <Text>This is the Sprungbrett offer called {sprungbrettOffer.title}</Text>
}
return MockedSprungbrettOffer
jest.mock('../SprungbrettOffer', () => ({ sprungbrettOffer }: { sprungbrettOffer: OfferModel }) => {
const { Text } = require('react-native')
return <Text>This is the Sprungbrett offer called {sprungbrettOffer.title}</Text>
})

jest.mock('../MalteHelpFormOffer', () => {
const MockedMalteHelpForm = ({ malteHelpFormOffer }: { malteHelpFormOffer: OfferModel }) => {
const { Text } = require('react-native')
return <Text>This is the Malte help form called {malteHelpFormOffer.title}</Text>
}
return MockedMalteHelpForm
jest.mock('../MalteHelpFormOffer', () => ({ malteHelpFormOffer }: { malteHelpFormOffer: OfferModel }) => {
const { Text } = require('react-native')
return <Text>This is the Malte help form called {malteHelpFormOffer.title}</Text>
})

describe('EmbeddedOffers', () => {
Expand Down
18 changes: 6 additions & 12 deletions web/src/components/__tests__/EmbeddedOffers.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,13 @@ import { CategoryModel, OfferModel } from 'shared/api'

import EmbeddedOffers from '../EmbeddedOffers'

jest.mock('../SprungbrettOffer', () => {
const MockedSprungbrettOffer = ({ sprungbrettOffer }: { sprungbrettOffer: OfferModel }) => (
<div>This is the Sprungbrett offer called {sprungbrettOffer.title}</div>
)
return MockedSprungbrettOffer
})
jest.mock('../SprungbrettOffer', () => ({ sprungbrettOffer }: { sprungbrettOffer: OfferModel }) => (
<div>This is the Sprungbrett offer called {sprungbrettOffer.title}</div>
))

jest.mock('../MalteHelpForm', () => {
const MockedMalteHelpForm = ({ malteHelpFormOffer }: { malteHelpFormOffer: OfferModel }) => (
<div>This is the Malte help form called {malteHelpFormOffer.title}</div>
)
return MockedMalteHelpForm
})
jest.mock('../MalteHelpForm', () => ({ malteHelpFormOffer }: { malteHelpFormOffer: OfferModel }) => (
<div>This is the Malte help form called {malteHelpFormOffer.title}</div>
))

describe('EmbeddedOffers', () => {
const createCategory = (offer: OfferModel) =>
Expand Down

0 comments on commit d5105ec

Please sign in to comment.