albatrosary's blog

UI/UXとエンタープライズシステム

Jest

ormconfig の記述

Jest's __dirname is src and NestJS's __dirname is dist. So if you want to use TypeORM's ormconfig for unit tests as well, we need to write a different definition. Jest import {ConnectionOptions} from 'typeorm'; const config: ConnectionOpti…