Skip to content

Commit

Permalink
feat(nestjs-store): code edit :)
Browse files Browse the repository at this point in the history
  • Loading branch information
tsangste committed Apr 4, 2023
1 parent 233da3f commit ec1d44f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
10 changes: 9 additions & 1 deletion libs/nestjs-storage/src/services/storage.service.spec.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
import { Test, TestingModule } from '@nestjs/testing'

import { S3Client } from '@aws-sdk/client-s3'

import { StorageService } from './storage.service'

describe('StorageService', () => {
let service: StorageService

beforeEach(async () => {
const module: TestingModule = await Test.createTestingModule({
providers: [StorageService],
providers: [
StorageService,
{
provide: S3Client,
useValue: {}
}
],
}).compile()

service = module.get<StorageService>(StorageService)
Expand Down
6 changes: 5 additions & 1 deletion libs/nestjs-storage/src/services/storage.service.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import { Injectable } from '@nestjs/common'

import { S3Client } from '@aws-sdk/client-s3'

@Injectable()
export class StorageService {}
export class StorageService {
constructor(private readonly s3client: S3Client) {}
}

0 comments on commit ec1d44f

Please sign in to comment.