Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependency updates iteration 3 - upgrade jasmine and schematics #1318

Merged
merged 62 commits into from
Oct 10, 2024
Merged
Changes from 1 commit
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
829c8bc
chore(*): update fs-extra & types to latest
jackofdiamond5 Aug 27, 2024
a89343c
chore(*): update browser-sync & lite-server to latest
jackofdiamond5 Aug 27, 2024
2aafd5e
chore(cli): bump types/node, nyc, fs-extra, types/fs-extra, browser-s…
jackofdiamond5 Aug 27, 2024
2f4e7ae
chore(root; cli): update typescript-json-schema, remove deprecated op…
jackofdiamond5 Aug 27, 2024
bc905a2
chore(root; cli): update through2, source-map-support
jackofdiamond5 Aug 27, 2024
5c233c0
chore(cli): bump ts-node
jackofdiamond5 Aug 27, 2024
c84b473
chore(root; cli): bump chalk, coveralls
jackofdiamond5 Aug 27, 2024
89a73e6
chore(root;cli): bump glob, resolve, rxjs, handlebars
jackofdiamond5 Aug 27, 2024
c15ed09
chore(cli): bump yargs
jackofdiamond5 Aug 28, 2024
eca83f3
refactor(cli): update quickstart command; introduce strict types
jackofdiamond5 Aug 28, 2024
787b358
refactor(cli): update new command; introduce strict types
jackofdiamond5 Aug 30, 2024
82ead59
refactor(cli): rework command chaining; update add command; introduce…
jackofdiamond5 Aug 30, 2024
f2ffa0a
refactor(cli): update build command; introduce strict types
jackofdiamond5 Aug 30, 2024
db719d9
refactor(cli): update start command; introduce strict types
jackofdiamond5 Aug 30, 2024
9ad3b48
refactor(cli): update generate command; introduce strict types
jackofdiamond5 Sep 2, 2024
28336d9
refactor(cli): update config command; introduce strict types
jackofdiamond5 Sep 2, 2024
bd6b043
refactor(cli_: update doc command; introduce strict types
jackofdiamond5 Sep 2, 2024
734b3e0
refactor(cli): update test command; introduce strict types
jackofdiamond5 Sep 3, 2024
768d487
refactor(cli): update list command; introduce strict types
jackofdiamond5 Sep 3, 2024
5af7188
refactor(cli): update upgrade command; introduce strict types
jackofdiamond5 Sep 3, 2024
b769f6e
refactor(cli): setup help command
jackofdiamond5 Sep 4, 2024
40bbccf
refactor(execute): provide args to cli.run
jackofdiamond5 Sep 4, 2024
c62098e
refactor(cli): disable usage msg on all commands
jackofdiamond5 Sep 4, 2024
67cb21e
refactor(cli): check for help on quickstart; use correct upgrade comm…
jackofdiamond5 Sep 4, 2024
2dde833
test(help): introduce tests for all commands
jackofdiamond5 Sep 4, 2024
e1bc4ca
refactor(cli): export commands from an index
jackofdiamond5 Sep 4, 2024
25ab771
docs(cli): add docs for new types
jackofdiamond5 Sep 4, 2024
f5a08b8
refactor(workflows): remove 18.x for node ci
jackofdiamond5 Sep 4, 2024
8fc6d51
refactor(workflows): generate coverage for 20.x
jackofdiamond5 Sep 4, 2024
ef74720
refactor(*): use report-dir for nyc report
jackofdiamond5 Sep 4, 2024
065983a
refactor(root; cli): remove fs-extra
jackofdiamond5 Sep 4, 2024
d965429
refactor(cli): run prompt session when no command matches input
jackofdiamond5 Sep 9, 2024
2c77e4c
Merge remote-tracking branch 'remotes/origin/master' into bpenkov/dep…
jackofdiamond5 Sep 9, 2024
0b01772
refactor(cli): do not trigger prompt session on help request
jackofdiamond5 Sep 9, 2024
6e591de
upgrade jasmine, types/jasmine, types/node packages
Sep 10, 2024
83d3e6c
remove done to fix tests
Sep 10, 2024
1587d90
fix tests
Sep 13, 2024
d03bc4c
merge from master
Sep 14, 2024
12338f7
fix tests
Sep 16, 2024
f414206
fix AngularTemplate and IgniteUiForAngularTemplate tests
Sep 16, 2024
017522c
upgrade cli jasmine packages
Sep 16, 2024
6ca2b0b
upgrade ng-shematics jasmine packages
Sep 16, 2024
97637d4
remove wrong added cli dependencies
Sep 16, 2024
6548f39
resolve conflicts and fix PromptSession tests
Sep 17, 2024
6e406a4
upgrade angular devkit packages
Sep 17, 2024
b56b43c
upgrade jasmine-spec-reporter to latest and fix build
Sep 17, 2024
ce447d5
upgrade through2 core package to latest
Sep 18, 2024
c550a72
refactor(cli): fix AngularTemplate and IginiteUIForAngularTemplate sp…
Sep 19, 2024
96fb62b
refactor(cli): merge from master
Sep 20, 2024
fb933af
chore: release 14.1.0-beta.0
Sep 20, 2024
eee39c6
refactor(cli): fix release by setting esModuleInterup to true
Sep 20, 2024
d205c44
refactor(cli): fix release by import yargs with require
Sep 24, 2024
3eaa083
refactor(cli): fix release by adding allowSyntheticDefaultImports
Sep 24, 2024
daf685a
refactor(cli): fix release by adding esModuleInterop in tsconfig-pack…
Sep 24, 2024
42bff01
refactor(cli): fix release by add missing properties from tsconfig in…
Sep 24, 2024
acd6f62
refactor(cli): fix release by adding tsconfig-pack.json in cli
Sep 25, 2024
eeaca16
refactor(cli): fix release by adding tsconfig to cli and esModuleInte…
Sep 25, 2024
6f31e62
refactor(cli): upgrade typescript to 5.5.4
Sep 25, 2024
1ac8ccd
refactor(cli): fix release by setting esModuleInterup to true in proj…
Sep 25, 2024
f7a0b2d
refactor(cli): remove tsconfig files from cli and the properties that…
Oct 2, 2024
83eb24e
chore: release 14.1.0-beta.1
Oct 2, 2024
a611e0c
refactor(cli): fix spaces and tabs
Oct 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
upgrade angular devkit packages
Hristo Hristov authored and Hristo Hristov committed Sep 17, 2024
commit 6e406a4f3ab26f032be29fd3a07754b8230ccbe8
2 changes: 1 addition & 1 deletion packages/cli/migrations/update-13_1_0/index.spec.ts
Original file line number Diff line number Diff line change
@@ -40,7 +40,7 @@ describe("Update 13.1.0", () => {
}`
);

const tree = await schematicRunner.runSchematicAsync("migration-07", { applyMigrations: true }, appTree).toPromise();
const tree = await schematicRunner.runSchematic("migration-07", { applyMigrations: true }, appTree);
expect(tree.readContent("./ignite-ui-cli.json"))
.toEqual(
`{
2 changes: 1 addition & 1 deletion packages/cli/migrations/update-2/index.spec.ts
Original file line number Diff line number Diff line change
@@ -46,7 +46,7 @@ export class AppComponent implements OnInit {
`
);

const tree = await schematicRunner.runSchematicAsync("migration-01", {}, appTree).toPromise();
const tree = await schematicRunner.runSchematic("migration-01", {}, appTree);
expect(tree.readContent("/src/app/app.component.ts"))
.toEqual(
`import { Component, OnInit, ViewChild } from '@angular/core';
14 changes: 7 additions & 7 deletions packages/cli/migrations/update-3/index.spec.ts
Original file line number Diff line number Diff line change
@@ -21,23 +21,23 @@ describe("Update 3.0.0", () => {
</body>`
);

await schematicRunner.runSchematicAsync("migration-02", {}, appTree).toPromise();
await schematicRunner.runSchematic("migration-02", {}, appTree);
expect(appTree.readContent(indexFile))
.toEqual(
`<body class="ig-typography">
<app-root></app-root>
</body>`
);
appTree.overwrite(indexFile, `<body class="">`);
await schematicRunner.runSchematicAsync("migration-02", {}, appTree).toPromise();
await schematicRunner.runSchematic("migration-02", {}, appTree);
expect(appTree.readContent(indexFile)).toEqual(`<body class="ig-typography">`);

appTree.overwrite(indexFile, `<body class="test class">`);
await schematicRunner.runSchematicAsync("migration-02", {}, appTree).toPromise();
await schematicRunner.runSchematic("migration-02", {}, appTree);
expect(appTree.readContent(indexFile)).toEqual(`<body class="test class ig-typography">`);

appTree.overwrite(indexFile, `<body class="test ig-typography">`);
await schematicRunner.runSchematicAsync("migration-02", {}, appTree).toPromise();
await schematicRunner.runSchematic("migration-02", {}, appTree);
expect(appTree.readContent(indexFile)).toEqual(`<body class="test ig-typography">`);
});

@@ -50,7 +50,7 @@ describe("Update 3.0.0", () => {
`
);

await schematicRunner.runSchematicAsync("migration-02", {}, appTree).toPromise();
await schematicRunner.runSchematic("migration-02", {}, appTree);
expect(appTree.readContent(cssFile))
.toEqual(
`body {
@@ -82,7 +82,7 @@ h3 {
})`
);

await schematicRunner.runSchematicAsync("migration-02", {}, appTree).toPromise();
await schematicRunner.runSchematic("migration-02", {}, appTree);
expect(appTree.readContent(indexFile))
.toEqual(
`@NgModule({
@@ -108,7 +108,7 @@ h3 {
}`
);

await schematicRunner.runSchematicAsync("migration-02", {}, appTree).toPromise();
await schematicRunner.runSchematic("migration-02", {}, appTree);
expect(appTree.readContent(indexFile))
.toEqual(
`{
3 changes: 2 additions & 1 deletion packages/cli/migrations/update-3_2/index.spec.ts
Original file line number Diff line number Diff line change
@@ -12,6 +12,7 @@ describe("Update 3.2.0", () => {
defaultProject: "testProj",
projects: {
testProj: {
root: "",
sourceRoot: "/src"
}
},
@@ -47,7 +48,7 @@ describe("Update 3.2.0", () => {
}`
);

await schematicRunner.runSchematicAsync("migration-03", {}, appTree).toPromise();
await schematicRunner.runSchematic("migration-03", {}, appTree);
expect(appTree.readContent(summaryFile))
.toEqual(
`class CustomDateSummary extends IgxDateSummaryOperand {
3 changes: 2 additions & 1 deletion packages/cli/migrations/update-4_2_3/index.spec.ts
Original file line number Diff line number Diff line change
@@ -12,6 +12,7 @@ describe("Update 4.2.3", () => {
defaultProject: "testProj",
projects: {
testProj: {
root: "",
sourceRoot: "/src"
}
},
@@ -43,7 +44,7 @@ describe("Update 4.2.3", () => {
`
);

await schematicRunner.runSchematicAsync("migration-04", {}, appTree).toPromise();
await schematicRunner.runSchematic("migration-04", {}, appTree);
expect(appTree.readContent(stylesFile).replace(/\r\n/g, "\n"))
.toEqual(
`@use 'igniteui-angular/theming' as *;
3 changes: 2 additions & 1 deletion packages/cli/migrations/update-5_0_0/index.spec.ts
Original file line number Diff line number Diff line change
@@ -12,6 +12,7 @@ describe("Update 5.0.0", () => {
defaultProject: "testProj",
projects: {
testProj: {
root: "",
prefix: "app",
sourceRoot: "src"
}
@@ -45,7 +46,7 @@ export class AppModule {
`
);

await schematicRunner.runSchematicAsync("migration-05", {}, appTree).toPromise();
await schematicRunner.runSchematic("migration-05", {}, appTree);
expect(appTree.readContent(indexFile).replace(/\r\n/g, "\n"))
.toEqual(
`import { BrowserModule, HammerModule } from '@angular/platform-browser';
3 changes: 2 additions & 1 deletion packages/cli/migrations/update-5_0_3/index.spec.ts
Original file line number Diff line number Diff line change
@@ -12,6 +12,7 @@ describe("Update 5.0.0", () => {
defaultProject: "testProj",
projects: {
testProj: {
root: "",
prefix: "app",
sourceRoot: "src"
}
@@ -40,7 +41,7 @@ export class GlobalErrorHandlerService implements ErrorHandler {
`
);

await schematicRunner.runSchematicAsync("migration-06", {}, appTree).toPromise();
await schematicRunner.runSchematic("migration-06", {}, appTree);
expect(appTree.readContent(errorService).replace(/\r\n/g, "\n"))
.toEqual(
`import { ErrorHandler, Injectable, isDevMode } from '@angular/core';
4 changes: 2 additions & 2 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -91,8 +91,8 @@
"yargs": "^17.7.2"
},
"devDependencies": {
"@angular-devkit/core": "~14.0.0",
"@angular-devkit/schematics": "~14.0.0",
"@angular-devkit/core": "^18.2.4",
"@angular-devkit/schematics": "^18.2.4",
"@schematics/angular": "~14.0.0",
"@types/jasmine": "^5.1.4",
"@types/node": "^22.5.5",
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@
"typescript": "~5.4.3"
},
"devDependencies": {
"@angular-devkit/schematics": "~14.0.0",
"@angular-devkit/schematics": "^18.2.4",
"@inquirer/type": "^1.5.3"
}
}
6 changes: 3 additions & 3 deletions packages/ng-schematics/package.json
Original file line number Diff line number Diff line change
@@ -18,12 +18,12 @@
"license": "MIT",
"schematics": "./src/collection.json",
"dependencies": {
"@angular-devkit/core": "~14.0.0",
"@angular-devkit/schematics": "~14.0.0",
"@angular-devkit/core": "^18.2.4",
"@angular-devkit/schematics": "^18.2.4",
"@igniteui/angular-templates": "~18.1.1401",
"@igniteui/cli-core": "~14.0.1",
"@schematics/angular": "~14.0.0",
"rxjs": "^6.6.3"
"rxjs": "^7.8.1"
},
"devDependencies": {
"@types/jasmine": "^5.1.4",
2 changes: 1 addition & 1 deletion packages/ng-schematics/src/app-projects/index_spec.ts
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ describe("app-projects", () => {
};
spyOn(tree, "read").and.returnValue(Buffer.from(`Mock package content "igniteui-cli":`));
spyOn(tree, "overwrite");
await runner.runSchematicAsync("app-projects", mockOptions, tree).toPromise();
await runner.runSchematic("app-projects", mockOptions, tree);

expect(mockOptions.projTemplate.generateConfig).toHaveBeenCalled();
expect(tree.read).toHaveBeenCalledWith("./package.json");
31 changes: 16 additions & 15 deletions packages/ng-schematics/src/cli-config/index_spec.ts
Original file line number Diff line number Diff line change
@@ -13,6 +13,7 @@ describe("cli-config schematic", () => {
const ngJsonConfig = {
projects: {
testProj: {
root: "",
sourceRoot,
architect: {
build: {
@@ -94,7 +95,7 @@ describe("cli-config schematic", () => {
});

it("should create an ignite-ui-cli.json file correctly", async () => {
await runner.runSchematicAsync("cli-config", {}, tree).toPromise();
await runner.runSchematic("cli-config", {}, tree);
expect(tree.exists("ignite-ui-cli.json")).toBeTruthy();

const cliJsonData = JSON.parse(tree.readContent("/ignite-ui-cli.json"));
@@ -103,15 +104,15 @@ describe("cli-config schematic", () => {

it("should add typography correctly", async () => {
const targetFile = "/src/index.html";
await runner.runSchematicAsync("cli-config", {}, tree).toPromise();
await runner.runSchematic("cli-config", {}, tree);

const content = tree.readContent(targetFile);
expect(content.includes("<body class=\"ig-typography ig-scrollbar\">")).toBeTruthy();
});

it("should add Titillium and Material Icons stylesheets correctly", async () => {
const targetFile = "/src/index.html";
await runner.runSchematicAsync("cli-config", {}, tree).toPromise();
await runner.runSchematic("cli-config", {}, tree);

const content = tree.readContent(targetFile);
const headContentsRegex = /(?:<head>)([\s\S]*)(?:<\/head>)/;
@@ -125,7 +126,7 @@ describe("cli-config schematic", () => {
const targetFile = "/src/styles.scss";
tree.create(targetFile, "");

await runner.runSchematicAsync("cli-config", {}, tree).toPromise();
await runner.runSchematic("cli-config", {}, tree);

let content = tree.readContent(targetFile);
expect(content.includes(`@use "${NPM_ANGULAR}`)).toBeTruthy();
@@ -135,7 +136,7 @@ describe("cli-config schematic", () => {
createIgPkgJson(FEED_ANGULAR);
populatePkgJson(FEED_ANGULAR);

await runner.runSchematicAsync("cli-config", {}, tree).toPromise();
await runner.runSchematic("cli-config", {}, tree);
content = tree.readContent(targetFile);
expect(content.includes(`@use "${FEED_ANGULAR}`)).toBeTruthy();
});
@@ -145,7 +146,7 @@ describe("cli-config schematic", () => {
expect(tree.exists(targetFile)).toBeTruthy();

let targetImport = `node_modules/${NPM_ANGULAR}/styles/igniteui-angular.css`;
await runner.runSchematicAsync("cli-config", {}, tree).toPromise();
await runner.runSchematic("cli-config", {}, tree);
let workspace = JSON.parse(tree.read("/angular.json")!.toString());

expect(
@@ -164,7 +165,7 @@ describe("cli-config schematic", () => {
populatePkgJson(FEED_ANGULAR);
targetImport = `node_modules/${FEED_ANGULAR}/styles/igniteui-angular.css`;

await runner.runSchematicAsync("cli-config", {}, tree).toPromise();
await runner.runSchematic("cli-config", {}, tree);
workspace = JSON.parse(tree.read("/angular.json")!.toString());

expect(
@@ -186,7 +187,7 @@ describe("cli-config schematic", () => {
const targetFile = "/angular.json";
expect(tree.exists(targetFile)).toBeTruthy();

await runner.runSchematicAsync("cli-config", {}, tree).toPromise();
await runner.runSchematic("cli-config", {}, tree);
const workspace = JSON.parse(tree.read("/angular.json")!.toString());

// the schematic creates the hierarchy that leads to the styles object within the workspace,
@@ -199,7 +200,7 @@ describe("cli-config schematic", () => {
const targetFile = "/src/styles.sass";
tree.create(targetFile, "");

await runner.runSchematicAsync("cli-config", {}, tree).toPromise();
await runner.runSchematic("cli-config", {}, tree);

let content = tree.readContent(targetFile);
expect(content.includes(`@use "${NPM_ANGULAR}`)).toBeTruthy();
@@ -209,7 +210,7 @@ describe("cli-config schematic", () => {
createIgPkgJson(FEED_ANGULAR);
populatePkgJson(FEED_ANGULAR);

await runner.runSchematicAsync("cli-config", {}, tree).toPromise();
await runner.runSchematic("cli-config", {}, tree);
content = tree.readContent(targetFile);
expect(content.includes(`@use "${FEED_ANGULAR}`)).toBeTruthy();
});
@@ -236,7 +237,7 @@ export class AppModule {
const targetFile = "./src/app/app.module.ts";
tree.create(targetFile, moduleContent);

await runner.runSchematicAsync("cli-config", {}, tree).toPromise();
await runner.runSchematic("cli-config", {}, tree);
const content = tree.readContent(targetFile);
expect(content.replace(/\r\n/g, "\n")).toEqual(moduleContentAfterSchematic.replace(/\r\n/g, "\n"));
});
@@ -265,7 +266,7 @@ export const appConfig: ApplicationConfig = {
const targetFile = "./src/app/app.config.ts";
tree.create(targetFile, moduleContent);

await runner.runSchematicAsync("cli-config", {}, tree).toPromise();
await runner.runSchematic("cli-config", {}, tree);
const content = tree.readContent(targetFile);
expect(content.replace(/\r\n/g, "\n")).toEqual(moduleContentAfterSchematic.replace(/\r\n/g, "\n"));
});
@@ -284,7 +285,7 @@ export const appConfig: ApplicationConfig = {
const targetFile = "./src/app/app.config.ts";
tree.create(targetFile, moduleContent);

await runner.runSchematicAsync("cli-config", {}, tree).toPromise();
await runner.runSchematic("cli-config", {}, tree);
const content = tree.readContent(targetFile);
expect(content.replace(/\r\n/g, "\n")).toEqual(moduleContent.replace(/\r\n/g, "\n"));
});
@@ -296,7 +297,7 @@ export const appConfig: ApplicationConfig = {
warns.push(entry.message);
}
});
await runner.runSchematicAsync("cli-config", {}, tree).toPromise();
await runner.runSchematic("cli-config", {}, tree);
let pattern = new RegExp(`WARNING Version mismatch detected - ${NPM_ANGULAR}`);
expect(warns).toContain(jasmine.stringMatching(pattern));

@@ -305,7 +306,7 @@ export const appConfig: ApplicationConfig = {
populatePkgJson(FEED_ANGULAR);
pattern = new RegExp(`WARNING Version mismatch detected - ${FEED_ANGULAR}`);

await runner.runSchematicAsync("cli-config", {}, tree).toPromise();
await runner.runSchematic("cli-config", {}, tree);
expect(warns).toContain(jasmine.stringMatching(pattern));
});
});
4 changes: 2 additions & 2 deletions packages/ng-schematics/src/component/index_spec.ts
Original file line number Diff line number Diff line change
@@ -110,9 +110,9 @@ describe("component", () => {
const projConfigSpy = spyOn(ProjectConfig, "getConfig");
projConfigSpy.and.returnValue(mockConfig);

const tree = runner.runSchematicAsync("component",
const tree = runner.runSchematic("component",
{ name: "my-combo", template: "combo", templateInst: mockInst, skipRoute: false }, Tree.empty());
tree.subscribe(state => {
tree.then(state => {
expect(mockInst.generateConfig).toHaveBeenCalledWith("my-combo", {});
expect(mockInst.registerInProject).toHaveBeenCalledWith("", "my-combo", { skipRoute: false, modulePath: undefined });
expect(projLibSpy).toHaveBeenCalledWith("angular", "igx-ts");
Original file line number Diff line number Diff line change
@@ -39,7 +39,7 @@ describe("Update 17.1.0", () => {
`
);

const tree = await schematicRunner.runSchematicAsync("migration-01", { applyMigrations: true }, appTree).toPromise();
const tree = await schematicRunner.runSchematic("migration-01", { applyMigrations: true }, appTree);
expect(tree.readContent("./ignite-ui-cli.json"))
.toEqual(
`{
10 changes: 4 additions & 6 deletions packages/ng-schematics/src/ng-new/index_spec.ts
Original file line number Diff line number Diff line change
@@ -131,9 +131,8 @@ describe("Schematics ng-new", () => {
return currentTree;
});

runner.runSchematicAsync("ng-new", { version: "8.0.3" }, myTree)
.pipe(take(1))
.subscribe((e: UnitTestTree) => {
runner.runSchematic("ng-new", { version: "8.0.3" }, myTree)
.then((e: UnitTestTree) => {
for (const mockFunc of Object.entries(mockSession)) {
expect(mockFunc[1]).toHaveBeenCalled();
}
@@ -189,9 +188,8 @@ describe("Schematics ng-new", () => {
return currentTree;
});

runner.runSchematicAsync("ng-new", { version: "8.0.3", name: workingDirectory }, myTree)
.pipe(take(1))
.subscribe((e: UnitTestTree) => {
runner.runSchematic("ng-new", { version: "8.0.3", name: workingDirectory }, myTree)
.then((e: UnitTestTree) => {
expect(AppProjectSchematic.default).toHaveBeenCalled();
expect(e.files.length).toEqual(1);
expect(e.exists(`${workingDirectory}/.gitignore`)).toBeTruthy();
6 changes: 3 additions & 3 deletions packages/ng-schematics/src/upgrade-packages/index.spec.ts
Original file line number Diff line number Diff line change
@@ -115,7 +115,7 @@ describe("Schematics upgrade-packages", () => {
const upgradeSpy = spyOn(mockProjectTemplate, "upgradeIgniteUIPackages");
upgradeSpy.and.returnValue(Promise.resolve(false));

await runner.runSchematicAsync(schematicName, { }, appTree).toPromise();
await runner.runSchematic(schematicName, { }, appTree);
expect(GoogleAnalytics.post).toHaveBeenCalledWith({
t: "screenview",
cd: "Upgrade packages"
@@ -131,11 +131,11 @@ describe("Schematics upgrade-packages", () => {
expect(runner.tasks).toEqual([]);

upgradeSpy.and.returnValue(Promise.resolve(true));
await runner.runSchematicAsync(schematicName, { skipInstall: true }, appTree).toPromise();
await runner.runSchematic(schematicName, { skipInstall: true }, appTree);
expect(upgradeSpy).toHaveBeenCalledTimes(2);
expect(runner.tasks).toEqual([]);

await runner.runSchematicAsync(schematicName, { }, appTree).toPromise();
await runner.runSchematic(schematicName, { }, appTree);
expect(upgradeSpy).toHaveBeenCalledTimes(3);
const installTaskOptions = new NodePackageInstallTask().toConfiguration();
expect(runner.tasks).toContain(jasmine.objectContaining(installTaskOptions));
Loading

Unchanged files with check annotations Beta

};
// tslint:disable-next-line:no-var-requires
const config = require("../packages/cli/package.json");

Check warning on line 9 in scripts/build-task.ts

GitHub Actions / run-tests (20.x)

Reaching to "../packages/cli/package.json" is not allowed
config.scripts = scripts;
// tslint:disable-next-line:no-var-requires
const schematicsConfig = require("../packages/ng-schematics/package.json");

Check warning on line 12 in scripts/build-task.ts

GitHub Actions / run-tests (20.x)

Reaching to "../packages/ng-schematics/package.json" is not allowed
Object.assign(schematicsConfig.scripts, scripts);
writeFileSync("./packages/cli/package.json", JSON.stringify(config, null, 2));
const jasmineInst = new Jasmine({});
jasmineInst.env.clearReporters();
jasmineInst.env.addReporter(new SpecReporter({

Check failure on line 13 in spec/jasmine-runner.ts

GitHub Actions / run-tests (20.x)

Argument of type 'SpecReporter' is not assignable to parameter of type 'CustomReporter'.
customProcessors: [CustomProcessor]
}));