Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
norda-gunni committed Oct 10, 2024
1 parent cbc5962 commit 2e1f568
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,32 @@ import { ConfigService } from '@nestjs/config'
import * as utils from './shared.utils'

const mockConfig = {
clientLocationOrigin: 'http://localhost:4242',
baseApiUrl: 'http://localhost:4444',
attachmentBucket: 'attachmentBucket',
templateApi: {
clientLocationOrigin: 'http://localhost:4242/umsoknir',
email: {
sender: 'Devland.is',
address: 'development@island.is',
},
jwtSecret: 'supersecret',
xRoadBasePathWithEnv: '',
SharedModuleConfig: {
clientLocationOrigin: 'http://localhost:4242',
baseApiUrl: 'http://localhost:4444',
presignBucket: '',
attachmentBucket: 'island-is-dev-storage-application-system',
generalPetition: {
endorsementApiBasePath: 'http://localhost:4246',
},
userProfile: {
serviceBasePath: 'http://localhost:3366',
},
islykill: {
cert: '',
passphrase: '',
basePath: '',
attachmentBucket: 'attachmentBucket',
templateApi: {
clientLocationOrigin: 'http://localhost:4242/umsoknir',
email: {
sender: 'Devland.is',
address: 'development@island.is',
},
jwtSecret: 'supersecret',
xRoadBasePathWithEnv: '',
baseApiUrl: 'http://localhost:4444',
presignBucket: '',
attachmentBucket: 'island-is-dev-storage-application-system',
generalPetition: {
endorsementApiBasePath: 'http://localhost:4246',
},
userProfile: {
serviceBasePath: 'http://localhost:3366',
},
islykill: {
cert: '',
passphrase: '',
basePath: '',
},
},
},
}
Expand Down Expand Up @@ -92,7 +94,7 @@ describe('shared utils', () => {
let configService: ConfigService<SharedModuleConfig>

beforeEach(() => {
configService = new ConfigService<SharedModuleConfig>(mockConfig)
configService = new ConfigService(mockConfig)
})

it('should get the client location origin from the config', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ import { ApplicationTypes } from '@island.is/application/types'
import { sharedModuleConfig } from '../../shared'

const mockConfig = {
templateApi: {
attachmentBucket: 'island-is-dev-storage-application-system',
SharedModuleConfig: {
templateApi: {
attachmentBucket: 'island-is-dev-storage-application-system',
},
},
}

Expand Down

0 comments on commit 2e1f568

Please sign in to comment.