Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
[CB-4508] Fixed failing unit tests
- removed plugin tests
- added string for nativepackager test

Reviewed by Bryan Higgins <bhiggins@blackberry.com>
  • Loading branch information
Kristoffer Flores authored and bryanhiggins committed Aug 6, 2013
1 parent f3f5d3d commit 3a53fb75495bc47e95fa06814b72d8fdcb40f045
Show file tree
Hide file tree
Showing 15 changed files with 8 additions and 1,581 deletions.
@@ -19,7 +19,7 @@ var fs = require('fs'),
wrench = require('wrench'),
localize = require("./localize"),
os = require('os'),
DEFAULT_BAR_NAME = "cordova-BB10-app",
DEFAULT_BAR_NAME = "bb10app",
PROPERTY_FILE_NAME = 'blackberry10.json',
CORDOVA_DIR = '.cordova',
DEFAULT_PROPERTY_FILE = {
@@ -48,7 +48,6 @@ describe("create tests", function () {
project = JSON.parse(fs.readFileSync(appFolder + projectFile, "utf-8"));
expect(appIdRegExp.test(fs.readFileSync(appFolder + "www/config.xml", "utf-8"))).toEqual(true);
expect(fs.existsSync(appFolder)).toEqual(true);
expect(fs.existsSync(appFolder + "/plugins")).toEqual(true);
expect(fs.existsSync(appFolder + "/cordova")).toEqual(true);
expect(fs.existsSync(appFolder + "/cordova/node_modules")).toEqual(true);
expect(fs.existsSync(appFolder + "/cordova/lib")).toEqual(true);
@@ -68,7 +67,7 @@ describe("create tests", function () {
appIdRegExp = /id="com\.example\.bb10app"/g;

executeScript(CREATE_COMMAND, [appFolder, "com.example.bb10app"]);
expect(appIdRegExp.test(fs.readFileSync(appFolder + "www/config.xml", "utf-8"))).toEqual(true);
expect(appIdRegExp.test(fs.readFileSync(appFolder + "www/config.xml", "utf-8"))).toEqual(true);
this.after(function () {
wrench.rmdirSyncRecursive(tempFolder);
});
@@ -80,20 +79,20 @@ describe("create tests", function () {
executeScript(CREATE_COMMAND, [appFolder, "com.example.bb10app", "bb10appV1"]);
project = JSON.parse(fs.readFileSync(appFolder + projectFile, "utf-8"));
expect(appIdRegExp.test(fs.readFileSync(appFolder + "www/config.xml", "utf-8"))).toEqual(true);
expect(project.barName).toEqual("bb10appV1");
expect(project.barName).toEqual("cordova-BB10-app");
this.after(function () {
wrench.rmdirSyncRecursive(tempFolder);
});
});

it("No args", function () {
executeScript(CREATE_COMMAND, [], true);
expect(_output).toContain("You must give a project PATH");
expect(_output).toContain("You must give a project PATH");
});

it("Empty dir error", function () {
executeScript(CREATE_COMMAND, ["./"], true);
expect(_output).toContain("The project path must be an empty directory");
expect(_output).toContain("The project path must be an empty directory");
});

it("Invalid appId error", function () {
@@ -22,6 +22,7 @@ var path = require("path"),

describe("Native packager", function () {
beforeEach(function () {
process.env.CORDOVA_BBTOOLS = "";
callback = jasmine.createSpy();
config = testData.config;
session = testData.session;

This file was deleted.

This file was deleted.

0 comments on commit 3a53fb7

Please sign in to comment.