Skip to content

Commit f3fe65a

Browse files
authored
Merge pull request #14919 from IgniteUI/dpetev/migrations-test-fixes
Migrations test fixes
2 parents d6e7b0e + dc1df62 commit f3fe65a

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

projects/igniteui-angular/migrations/common/UpdateChanges.spec.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,10 @@ describe('UpdateChanges', () => {
3434
appTree = setupTestTree({
3535
projects: {
3636
testProj: {
37+
projectType: 'application',
3738
root: '',
38-
sourceRoot: '/'
39+
sourceRoot: '/',
40+
architect: { build: { options: {} } }
3941
}
4042
},
4143
schematics: {

projects/igniteui-angular/migrations/common/setup.spec.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ class IgxUnitTestTree extends UnitTestTree {
5656
if (!project.containsScriptInfo(scriptInfo)) {
5757
// add the file to the configured project to prevent tss from creating an inferred project for floating files
5858
scriptInfo.attachToProject(project);
59+
// add root in advance for ng LS discovery if two files test.component.ts/html and html is analyzed first
60+
project.addMissingFileRoot(scriptInfo.fileName);
5961
} else {
6062
// if using same file, force-reload from host for new content
6163
scriptInfo.reloadFromFile(tss.server.asNormalizedPath(entryPath));

0 commit comments

Comments
 (0)