Refactored tests
Signed-off-by: boris <boris.karastanev@progress.com>
This commit is contained in:
Родитель
1b08cb0537
Коммит
aa166e6a02
|
@ -1,6 +1,6 @@
|
|||
import { Yok } from "mobile-cli-lib/yok";
|
||||
import { GitService } from "../lib/services/git-service";
|
||||
import { PageService } from "../lib/services/page-service";
|
||||
import { NsStarterKitsGitService } from "../lib/services/nsStarterKitsGitService";
|
||||
import { NsStarterKitsPageService } from "../lib/services/nsStarterKitsPageService";
|
||||
import util from "../lib/shared/util";
|
||||
|
||||
const chai = require("chai");
|
||||
|
@ -13,8 +13,8 @@ chai.use(chaiAsPromised);
|
|||
let testInjector: any;
|
||||
|
||||
describe("PageService Api", () => {
|
||||
let gitService: GitService;
|
||||
let pageService: PageService;
|
||||
let gitService: NsStarterKitsGitService;
|
||||
let pageService: NsStarterKitsPageService;
|
||||
|
||||
const pageName = "dummyPageName";
|
||||
const appPath = "dummyPath";
|
||||
|
@ -30,11 +30,11 @@ describe("PageService Api", () => {
|
|||
};
|
||||
|
||||
beforeEach(() => {
|
||||
gitService = new GitService();
|
||||
pageService = new PageService(gitService);
|
||||
gitService = new NsStarterKitsGitService();
|
||||
pageService = new NsStarterKitsPageService(gitService);
|
||||
testInjector = new Yok();
|
||||
|
||||
testInjector.register("pageService", PageService);
|
||||
testInjector.register("nsStarterKitsPageService", NsStarterKitsPageService);
|
||||
});
|
||||
|
||||
describe("Add page", () => {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { Yok } from "mobile-cli-lib/yok";
|
||||
import { GitService } from "../lib/services/git-service";
|
||||
import { TemplateService } from "../lib/services/template-service";
|
||||
import { NsStarterKitsGitService } from "../lib/services/nsStarterKitsGitService";
|
||||
import { NsStarterKitsTemplateService } from "../lib/services/nsStarterKitsTemplateService";
|
||||
import { Config } from "../lib/shared/config";
|
||||
|
||||
const templateBackup = require("../consts/templates-backup-data").fallback;
|
||||
|
@ -14,8 +14,8 @@ chai.use(chaiAsPromised);
|
|||
let testInjector: any;
|
||||
|
||||
describe("TemplateService Api", () => {
|
||||
let gitService: GitService;
|
||||
let templateService: TemplateService;
|
||||
let gitService: NsStarterKitsGitService;
|
||||
let templateService: NsStarterKitsTemplateService;
|
||||
|
||||
const packageJson = {
|
||||
name: "dummyName",
|
||||
|
@ -44,12 +44,12 @@ describe("TemplateService Api", () => {
|
|||
};
|
||||
|
||||
beforeEach(() => {
|
||||
gitService = new GitService();
|
||||
templateService = new TemplateService(gitService);
|
||||
gitService = new NsStarterKitsGitService();
|
||||
templateService = new NsStarterKitsTemplateService(gitService);
|
||||
|
||||
testInjector = new Yok();
|
||||
testInjector.register("templateService", TemplateService);
|
||||
testInjector.register("gitService", GitService);
|
||||
testInjector.register("nsStarterKitsTemplateService", NsStarterKitsTemplateService);
|
||||
testInjector.register("nsStarterKitsGitService", NsStarterKitsGitService);
|
||||
});
|
||||
|
||||
describe("Check template flavor", () => {
|
||||
|
|
Загрузка…
Ссылка в новой задаче