Skip to content

Commit 46f7422

Browse files
committed
chore: fix unit tests
1 parent 4e00a7a commit 46f7422

File tree

2 files changed

+5
-15
lines changed

2 files changed

+5
-15
lines changed

src/add-ns/index_spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ describe('Add {N} schematic', () => {
7878
const { dependencies, devDependencies } = packageJson;
7979
expect(dependencies).toBeDefined();
8080
expect(dependencies['nativescript-angular']).toBeDefined();
81-
expect(dependencies['nativescript-theme-core']).toBeDefined();
81+
expect(dependencies['@nativescript/theme']).toBeDefined();
8282
expect(dependencies['tns-core-modules']).toBeDefined();
8383
expect(dependencies['reflect-metadata']).toBeDefined();
8484

src/styling/index_spec.ts

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ describe('Styling Schematic', () => {
6565

6666
expect(getFileContent(tree, stylingFile))
6767
.not
68-
.toMatch(new RegExp('@import "~nativescript-theme-core/css/core.light.css";'));
68+
.toMatch(new RegExp('@import "~@nativescript/theme/css/core.css";'));
6969
});
7070
});
7171

@@ -85,7 +85,7 @@ describe('Styling Schematic', () => {
8585
expect(tree.exists(`${appPath}/${sourceDir}/app.android.scss`));
8686
expect(tree.exists(`${appPath}/${sourceDir}/app.ios.scss`));
8787
expect(tree.exists(`${appPath}/${sourceDir}/_app-common.scss`));
88-
expect(tree.exists(`${appPath}/${sourceDir}/_app-variables.scss`));
88+
expect(tree.exists(`${appPath}/${sourceDir}/_app-variables.scss`)).toBe(false);
8989
});
9090

9191
it('should add scss dependencies to package.json', () => {
@@ -109,21 +109,11 @@ describe('Styling Schematic', () => {
109109

110110
expect(getFileContent(tree, `${appPath}/${sourceDir}/app.android.scss`))
111111
.not
112-
.toMatch(new RegExp('@import \'~nativescript-theme-core/scss/index\';'));
113-
expect(getFileContent(tree, `${appPath}/${sourceDir}/app.android.scss`))
114-
.not
115-
.toMatch(new RegExp('@import \'~nativescript-theme-core/scss/platforms/index.android\';'));
112+
.toMatch(new RegExp('@import "~@nativescript/theme/css/core.css;'));
116113

117114
expect(getFileContent(tree, `${appPath}/${sourceDir}/app.ios.scss`))
118115
.not
119-
.toMatch(new RegExp('@import \'~nativescript-theme-core/scss/index\';'));
120-
expect(getFileContent(tree, `${appPath}/${sourceDir}/app.ios.scss`))
121-
.not
122-
.toMatch(new RegExp('@import \'~nativescript-theme-core/scss/platforms/index.ios\';'));
123-
124-
expect(getFileContent(tree, `${appPath}/${sourceDir}/_app-variables.scss`))
125-
.not
126-
.toMatch(new RegExp('@import \'~nativescript-theme-core/scss/light\';'));
116+
.toMatch(new RegExp('@import "~@nativescript/theme/css/core.css";'));
127117
});
128118
});
129119
});

0 commit comments

Comments
 (0)