@@ -236,9 +236,20 @@ export class MigrateController
236236 } ,
237237 migrateAction : this . migrateNativeScriptSvelte . bind ( this ) ,
238238 } ,
239+ {
240+ packageName : "nativescript-unit-test-runner" ,
241+ replaceWith : "@nativescript/unit-test-runner" ,
242+ shouldRemove : true ,
243+ isDev : true ,
244+ async shouldMigrateAction ( ) {
245+ return true ;
246+ } ,
247+ migrateAction : this . migrateUnitTestRunner . bind ( this ) ,
248+ } ,
239249 {
240250 packageName : "@nativescript/unit-test-runner" ,
241- minVersion : "2.0.0" ,
251+ minVersion : "1.0.0" ,
252+ desiredVersion : "~2.0.0" ,
242253 async shouldMigrateAction (
243254 dependency : IMigrationDependency ,
244255 projectData : IProjectData ,
@@ -1123,7 +1134,11 @@ export class MigrateController
11231134 this . $errors . fail ( "Failed to find replacement dependency." ) ;
11241135 }
11251136
1126- const version = dependency . desiredVersion ?? dependency . minVersion ;
1137+ const version =
1138+ replacementDep . desiredVersion ??
1139+ replacementDep . minVersion ??
1140+ dependency . desiredVersion ??
1141+ dependency . minVersion ;
11271142
11281143 // add replacement dependency
11291144 this . $pluginsService . addToPackageJson (
@@ -1287,6 +1302,7 @@ export class MigrateController
12871302 const karmaConf = _ . template ( karmaConfTemplate ) ( {
12881303 frameworks,
12891304 testFiles,
1305+ basePath : projectData . getAppDirectoryRelativePath ( ) ,
12901306 } ) ;
12911307 this . $fs . writeFile (
12921308 path . join ( projectData . projectDir , constants . KARMA_CONFIG_NAME ) ,
0 commit comments