diff --git a/app/angular/src/client/preview/angular-beta/RendererFactory.test.ts b/app/angular/src/client/preview/angular-beta/RendererFactory.test.ts
index f3f3233b73cd..754cc894fc70 100644
--- a/app/angular/src/client/preview/angular-beta/RendererFactory.test.ts
+++ b/app/angular/src/client/preview/angular-beta/RendererFactory.test.ts
@@ -1,4 +1,4 @@
-import { Component, getPlatform } from '@angular/core';
+import { Component, getPlatform, ษตresetJitOptions } from '@angular/core';
import { platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { Parameters } from '../types-6-0';
@@ -26,6 +26,10 @@ describe('RendererFactory', () => {
afterEach(() => {
jest.clearAllMocks();
+
+ // Necessary to avoid this error "Provided value for `preserveWhitespaces` can not be changed once it has been set." :
+ // Source: https://github.com/angular/angular/commit/e342ffd855ffeb8af7067b42307ffa320d82177e#diff-92b125e532cc22977b46a91f068d6d7ea81fd61b772842a4a0212f1cfd875be6R28
+ ษตresetJitOptions();
});
describe('CanvasRenderer', () => {
@@ -65,7 +69,9 @@ describe('RendererFactory', () => {
targetDOMNode: rootTargetDOMNode,
});
- expect(document.body.getElementsByTagName('my-story')[0].innerHTML).toBe('๐ฆ');
+ expect(document.body.getElementsByTagName('my-story')[0].innerHTML).toBe(
+ '๐ฆ'
+ );
});
describe('when forced=true', () => {
diff --git a/app/angular/src/client/preview/angular-beta/RendererService.test.ts b/app/angular/src/client/preview/angular-beta/RendererService.test.ts
index 920eb8f4d001..d404a287ab23 100644
--- a/app/angular/src/client/preview/angular-beta/RendererService.test.ts
+++ b/app/angular/src/client/preview/angular-beta/RendererService.test.ts
@@ -1,4 +1,4 @@
-import { Component } from '@angular/core';
+import { Component, ษตresetJitOptions } from '@angular/core';
import { platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { Parameters } from '../types-6-0';
@@ -18,6 +18,10 @@ describe('RendererService', () => {
afterEach(() => {
jest.clearAllMocks();
+
+ // Necessary to avoid this error "Provided value for `preserveWhitespaces` can not be changed once it has been set." :
+ // Source: https://github.com/angular/angular/commit/e342ffd855ffeb8af7067b42307ffa320d82177e#diff-92b125e532cc22977b46a91f068d6d7ea81fd61b772842a4a0212f1cfd875be6R28
+ ษตresetJitOptions();
});
it('should initialize', () => {
@@ -53,7 +57,7 @@ describe('RendererService', () => {
});
expect(document.body.getElementsByTagName('storybook-wrapper')[0].innerHTML).toBe(
- '๐ฆ'
+ '๐ฆ'
);
});
diff --git a/examples/angular-cli/package.json b/examples/angular-cli/package.json
index 2ba97ed35fcd..371d9211f2da 100644
--- a/examples/angular-cli/package.json
+++ b/examples/angular-cli/package.json
@@ -15,7 +15,8 @@
"test": "jest",
"test:coverage": "jest --coverage",
"test:generate-output": "jest --json --config=jest.addon-config.js --outputFile=addon-jest.testresults.json || true",
- "test:watch": "jest --watch"
+ "test:watch": "jest --watch",
+ "postinstall": "ngcc --source ../../node_modules"
},
"dependencies": {
"@angular/common": "^11.2.14",
@@ -28,6 +29,7 @@
"core-js": "^3.8.2",
"node-sass": "^4.14.1",
"rxjs": "^6.6.3",
+ "telejson": "^5.3.2",
"zone.js": "^0.11.3"
},
"devDependencies": {
diff --git a/examples/angular-cli/src/stories/__snapshots__/welcome-angular.stories.storyshot b/examples/angular-cli/src/stories/__snapshots__/welcome-angular.stories.storyshot
index fab90a3835e2..3c6dbf4540b1 100644
--- a/examples/angular-cli/src/stories/__snapshots__/welcome-angular.stories.storyshot
+++ b/examples/angular-cli/src/stories/__snapshots__/welcome-angular.stories.storyshot
@@ -11,7 +11,7 @@ exports[`Storyshots Welcome/ To Angular To Angular 1`] = `
Welcome to app!
diff --git a/examples/angular-cli/src/stories/__snapshots__/welcome-storybook.stories.storyshot b/examples/angular-cli/src/stories/__snapshots__/welcome-storybook.stories.storyshot
index 13b8459513f8..cce66c723f4c 100644
--- a/examples/angular-cli/src/stories/__snapshots__/welcome-storybook.stories.storyshot
+++ b/examples/angular-cli/src/stories/__snapshots__/welcome-storybook.stories.storyshot
@@ -3,47 +3,47 @@
exports[`Storyshots Welcome/ To Storybook To Storybook 1`] = `
Welcome to storybook
This is a UI component dev environment for your app.
We've added some basic stories inside the
src/stories
directory.
A story is a single state of one or more UI components. You can have as many stories as you want.
(Basically a story is like a visual test case.)
Just like that, you can add your own components as stories.
You can also edit those components and see changes right away.
(Try editing the
Button
stories located at
src/stories/index.js
@@ -86,15 +86,15 @@ exports[`Storyshots Welcome/ To Storybook To Storybook 1`] = `
.)
Usually we create stories with smaller UI components in the app.
Have a look at the