File tree 1 file changed +5
-3
lines changed
packages/jest/src/plugins 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -153,12 +153,12 @@ async function buildJestTargets(
153
153
// nx-ignore-next-line
154
154
} ) ) as typeof import ( 'jest-runtime' ) ;
155
155
156
- const context = await Runtime . createContext ( config . projectConfig , {
156
+ const jestContext = await Runtime . createContext ( config . projectConfig , {
157
157
maxWorkers : 1 ,
158
158
watchman : false ,
159
159
} ) ;
160
160
161
- const source = new jest . SearchSource ( context ) ;
161
+ const source = new jest . SearchSource ( jestContext ) ;
162
162
163
163
const specs = await source . getTestPaths ( config . globalConfig ) ;
164
164
@@ -188,7 +188,9 @@ async function buildJestTargets(
188
188
targetGroup . push ( options . ciTargetName ) ;
189
189
190
190
for ( const testPath of testPaths ) {
191
- const relativePath = normalize ( relative ( projectRoot , testPath ) ) ;
191
+ const relativePath = normalize (
192
+ relative ( join ( context . workspaceRoot , projectRoot ) , testPath )
193
+ ) ;
192
194
const targetName = `${ options . ciTargetName } --${ relativePath } ` ;
193
195
dependsOn . push ( targetName ) ;
194
196
targets [ targetName ] = {
You can’t perform that action at this time.
0 commit comments