Skip to content

Commit

Permalink
refactor: schematics
Browse files Browse the repository at this point in the history
  • Loading branch information
Badisi committed Apr 30, 2024
1 parent 99e5892 commit a7eb716
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions projects/lib/schematics/ng-add/ng-add.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ const joc = jasmine.objectContaining;
if (useStandalone) {
it('should update app.config.ts', async () => {
const configTsPath = project.pathFromSourceRoot('app/app.config.ts');

await runner.runSchematic('ng-add', defaultOptions, tree);
const configTsContent = tree.readContent(configTsPath);
expect(configTsContent).toContain('import { provideSentry } from \'@hug/ngx-sentry\';');
Expand All @@ -88,7 +87,6 @@ const joc = jasmine.objectContaining;
if (useStandalone) {
expect(appModuleContent).not.toContain('import { NgxSentryModule } from \'@hug/ngx-sentry\'');
expect(appModuleContent).not.toContain('NgxSentryModule.forRoot()');

} else {
expect(appModuleContent).toContain('import { NgxSentryModule } from \'@hug/ngx-sentry\'');
expect(appModuleContent).toContain('NgxSentryModule.forRoot()');
Expand Down
2 changes: 1 addition & 1 deletion projects/lib/schematics/schematics.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export const appTest2: ApplicationOptions = {

export const collectionPath = join(__dirname, './collection.json');

export const runner = new SchematicTestRunner('ngx-starter', collectionPath);
export const runner = new SchematicTestRunner('ngx-sentry', collectionPath);

export const getCleanAppTree = async (useWorkspace = false, standalone = false): Promise<UnitTestTree> => {
appTest1.projectRoot = (useWorkspace) ? join(workspaceOptions.newProjectRoot!, appTest1.name) : '';
Expand Down

0 comments on commit a7eb716

Please sign in to comment.