Skip to content

Commit 716d175

Browse files
NathanWalkerrigor789
authored andcommitted
chore: unit-test-runner updates
1 parent 88d134a commit 716d175

File tree

8 files changed

+9
-9
lines changed

8 files changed

+9
-9
lines changed

docs/man_pages/general/migrate.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ The following dependencies will be updated if needed:
5353
* @angular-devkit/build-angular
5454
* rxjs
5555
* zone.js
56-
* nativescript-unit-test-runner
56+
* @nativescript/unit-test-runner
5757
* karma-webpack
5858
* karma-jasmine
5959
* karma-mocha

docs/man_pages/project/testing/test-init.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ position: 21
77

88
### Description
99

10-
Configures your project for unit testing with a selected framework. This operation installs the nativescript-unit-test-runner npm module and its dependencies and creates a `tests` folder in the `app` directory.
10+
Configures your project for unit testing with a selected framework. This operation installs the @nativescript/unit-test-runner npm module and its dependencies and creates a `tests` folder in the `app` directory.
1111

1212
### Commands
1313

lib/commands/test-init.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ class TestInitCommand implements ICommand {
8585
}
8686
}
8787

88-
await this.$pluginsService.add('nativescript-unit-test-runner', this.$projectData);
88+
await this.$pluginsService.add('@nativescript/unit-test-runner', this.$projectData);
8989

9090
const testsDir = path.join(this.$projectData.appDirectoryPath, 'tests');
9191
const relativeTestsDir = path.relative(this.$projectData.projectDir, testsDir);

lib/constants.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export const NODE_MODULE_CACHE_PATH_KEY_NAME = "node-modules-cache-path";
2424
export const DEFAULT_APP_IDENTIFIER_PREFIX = "org.nativescript";
2525
export const LIVESYNC_EXCLUDED_DIRECTORIES = ["app_resources"];
2626
export const TESTING_FRAMEWORKS = ['jasmine', 'mocha', 'qunit'];
27-
export const TEST_RUNNER_NAME = "nativescript-unit-test-runner";
27+
export const TEST_RUNNER_NAME = "@nativescript/unit-test-runner";
2828
export const LIVESYNC_EXCLUDED_FILE_PATTERNS = ["**/*.js.map", "**/*.ts"];
2929
export const XML_FILE_EXTENSION = ".xml";
3030
export const PLATFORMS_DIR_NAME = "platforms";

lib/controllers/migrate-controller.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@ Running this command will ${MigrateController.COMMON_MIGRATE_MESSAGE}`;
8181
{ packageName: "nativescript-permissions", verifiedVersion: "1.3.0" },
8282
{ packageName: "nativescript-cardview", verifiedVersion: "3.2.0" },
8383
{
84-
packageName: "nativescript-unit-test-runner", verifiedVersion: "0.7.0",
84+
packageName: "@nativescript/unit-test-runner", verifiedVersion: "1.0.0",
8585
shouldMigrateAction: async (projectData: IProjectData, allowInvalidVersions: boolean) => {
86-
const dependency = { packageName: "nativescript-unit-test-runner", verifiedVersion: "0.7.0", isDev: false };
86+
const dependency = { packageName: "@nativescript/unit-test-runner", verifiedVersion: "1.0.0", isDev: false };
8787
const result = this.hasDependency(dependency, projectData) && await this.shouldMigrateDependencyVersion(dependency, projectData, allowInvalidVersions);
8888
return result;
8989
},

lib/services/test-execution-service.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ export class TestExecutionService implements ITestExecutionService {
9393

9494
public async canStartKarmaServer(projectData: IProjectData): Promise<boolean> {
9595
let canStartKarmaServer = true;
96-
const requiredDependencies = ["karma", "nativescript-unit-test-runner"];
96+
const requiredDependencies = ["karma", "@nativescript/unit-test-runner"];
9797
_.each(requiredDependencies, (dep) => {
9898
if (!projectData.dependencies[dep] && !projectData.devDependencies[dep]) {
9999
canStartKarmaServer = false;

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "nativescript",
33
"preferGlobal": true,
4-
"version": "6.8.0",
4+
"version": "6.8.1-rc.0",
55
"author": "NativeScript <[email protected]>",
66
"description": "Command-line interface for building NativeScript projects",
77
"bin": {

test/services/test-execution-service.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { TestExecutionService } from "../../lib/services/test-execution-service"
33
import { assert } from "chai";
44

55
const karmaPluginName = "karma";
6-
const unitTestsPluginName = "nativescript-unit-test-runner";
6+
const unitTestsPluginName = "@nativescript/unit-test-runner";
77

88
function getTestExecutionService(): ITestExecutionService {
99
const injector = new InjectorStub();

0 commit comments

Comments
 (0)