Skip to content

Instantly share code, notes, and snippets.

View mspring03's full-sized avatar
🎯
Focusing

Myeongcheol Yu mspring03

🎯
Focusing
View GitHub Profile
@mspring03
mspring03 / orders.service.spec.ts
Created December 2, 2021 05:14
Nestjs unit-test Mocking of external modules.
import { Test } from '@nestjs/testing';
import { OrdersService } from 'order-api';
import { UsersService } from 'user-api';
describe('OrdersService', () => {
let ordersService: OrdersService;
beforeEach(async () => {
const moduleRef = await Test.createTestingModule({
providers: [
🌞 Morning 37 commits β–ˆβ–ˆβ–ˆβ–Œβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 17.1%
πŸŒ† Daytime 30 commits β–ˆβ–ˆβ–‰β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 13.8%
πŸŒƒ Evening 142 commits β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‹β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 65.4%
πŸŒ™ Night 8 commits β–Šβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 3.7%