Skip to content

Commit

Permalink
[kiworkshop#22] Pass to tests except tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
myeongjae-kim committed Oct 28, 2019
1 parent eb3610e commit 3a27267
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 8 deletions.
3 changes: 0 additions & 3 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,6 @@ module.exports = {

// A map from regular expressions to paths to transformers
// transform: null,
transform: {
'^.+\\.tsx?$': 'babel-jest',
},

// An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation
// transformIgnorePatterns: [
Expand Down
46 changes: 46 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import NoticeRequestDto from "src/mother/notice/api/dto/NoticeRequestDto";
import NoticeRepository from "src/mother/notice/domain/repository/NoticeRepository";
import { noticeService } from "src/mother/notice/infrastructure/service/NoticeServiceImpl";
import NoticeRequestDto from "../../../api/dto/NoticeRequestDto";
import NoticeRepository from "../../../domain/repository/NoticeRepository";
import { getNoticeFixture } from "../model/Notice.unit.test";

import { noticeRepository } from "../../../infrastructure/repository/NoticeRepositoryImpl";
jest.mock("../../infrastructure/repository/NoticeRepositoryImpl")
import { noticeRepository } from "src/mother/notice/infrastructure/repository/NoticeRepositoryImpl";
jest.mock("src/mother/notice/infrastructure/repository/NoticeRepositoryImpl")

describe("NoticeServiceImpl test", () => {
const mockNoticeRepository = noticeRepository as jest.Mocked<NoticeRepository>;
Expand All @@ -14,7 +14,7 @@ describe("NoticeServiceImpl test", () => {
(mockNoticeRepository.findById as jest.Mock).mockResolvedValue(getNoticeFixture());
const id = 1

// when
// whn
const notice = await noticeService.getNotice(id);

// then
Expand Down

0 comments on commit 3a27267

Please sign in to comment.