Skip to content

Commit

Permalink
fix(tests): schematics
Browse files Browse the repository at this point in the history
  • Loading branch information
Badisi committed Sep 6, 2024
1 parent ce6cd80 commit 8f982c2
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions projects/lib/schematics/ng-add/ng-add.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,19 +56,15 @@ const joc = jasmine.objectContaining;
it('should update main.ts', async () => {
await runner.runSchematic('ng-add', defaultOptions, tree);
const mainTsContent = tree.readContent(project.pathFromSourceRoot('main.ts'));
if (useStandalone) {
expect(mainTsContent).toContain('import { initSentry } from \'@hug/ngx-sentry\';');
} else {
expect(mainTsContent).toContain('import { initSentry } from \'@hug/ngx-sentry\';');
}
expect(mainTsContent).toContain('import { initSentry } from \'@hug/ngx-sentry\';');
expect(mainTsContent).toContain('import { isDevMode } from \'@angular/core\';');
expect(mainTsContent).toContain('import packageJson from \'../package.json\';');
expect(mainTsContent).toContain('initSentry({\n' +
` dsn: '${defaultOptions.dsnUrl}',\n` +
' environment: \'DEV\', // replace it with your own value\n' +
' release: packageJson.version,\n' +
' enabled: !isDevMode()\n' +
'});');
` dsn: '${defaultOptions.dsnUrl}',\n` +
' environment: \'DEV\', // replace it with your own value\n' +
' release: packageJson.version,\n' +
' enabled: !isDevMode()\n' +
'});');
});

if (useStandalone) {
Expand Down

0 comments on commit 8f982c2

Please sign in to comment.