File tree Expand file tree Collapse file tree 4 files changed +2101
-36
lines changed Expand file tree Collapse file tree 4 files changed +2101
-36
lines changed Original file line number Diff line number Diff line change 1+ module . exports = {
2+ roots : [ '<rootDir>/src' ] ,
3+ testMatch : [ '**/__tests__/**/*.+(ts|tsx|js)' , '**/?(*.)+(spec|test).+(ts|tsx|js)' ] ,
4+ transform : {
5+ '^.+\\.(ts|tsx)$' : 'ts-jest' ,
6+ } ,
7+ }
Original file line number Diff line number Diff line change 3030 "dev:test-app" : " cd test-app && yarn dev" ,
3131 "dev" : " yarn watch & yarn dev:test-app" ,
3232 "build" : " rimraf ./dist && tsc" ,
33- "stable" : " dripip stable"
33+ "stable" : " dripip stable" ,
34+ "test" : " jest" ,
35+ "test:watch" : " jest --watch"
3436 },
3537 "dependencies" : {},
3638 "devDependencies" : {
3739 "@prisma-labs/prettier-config" : " 0.1.0" ,
40+ "@types/jest" : " ^26.0.15" ,
3841 "@types/webpack" : " 4.41.22" ,
3942 "dripip" : " 0.10.0" ,
4043 "eslint" : " 7.10.0" ,
4144 "eslint-config-prettier" : " 6.12.0" ,
45+ "jest" : " ^26.6.0" ,
4246 "prettier" : " 2.1.2" ,
4347 "prettier-eslint" : " 11.0.0" ,
4448 "rimraf" : " ^3.0.2" ,
49+ "ts-jest" : " ^26.4.1" ,
4550 "typescript" : " 4.0.3" ,
4651 "webpack" : " 4.44.2"
4752 },
Original file line number Diff line number Diff line change 1+ import withPrismaPlugin from '../index'
2+
3+ describe ( 'withPrismaPlugin' , ( ) => {
4+ it ( 'should keep nextConfig object properties in other phases' , ( ) => {
5+ const nextConfig = { foo : 'bar' }
6+
7+ const newConfig = withPrismaPlugin ( nextConfig ) ( 'NO_PHASE' , { } )
8+ expect ( newConfig ) . toEqual ( nextConfig )
9+ } )
10+
11+ it ( 'should call nextConfig function in other phases' , ( ) => {
12+ const nextConfig = ( ) => ( { foo : 'bar' } )
13+
14+ const newConfig = withPrismaPlugin ( nextConfig ) ( 'NO_PHASE' , { } )
15+ expect ( newConfig ) . toEqual ( nextConfig ( ) )
16+ } )
17+
18+ it ( 'should add webpack property' , ( ) => {
19+ const nextConfig = { foo : 'bar' }
20+
21+ const newConfig = withPrismaPlugin ( nextConfig ) ( 'phase-development-server' , { } )
22+ expect ( newConfig ) . toHaveProperty ( 'webpack' )
23+ } )
24+ } )
You can’t perform that action at this time.
0 commit comments