diff --git a/addons/storyshots/storyshots-core/src/frameworks/angular/loader.js b/addons/storyshots/storyshots-core/src/frameworks/angular/loader.js index 981da4f36a7..9019699ac72 100644 --- a/addons/storyshots/storyshots-core/src/frameworks/angular/loader.js +++ b/addons/storyshots/storyshots-core/src/frameworks/angular/loader.js @@ -2,6 +2,9 @@ import hasDependency from '../hasDependency'; import configure from '../configure'; function setupAngularJestPreset() { + // Needed to prevent "Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten." + require.requireActual('core-js/modules/es6.promise'); + // Angular + Jest + Storyshots = Crazy Shit: // We need to require 'jest-preset-angular/setupJest' before any storybook code // is running inside jest - one of the things that `jest-preset-angular/setupJest` does is diff --git a/examples/angular-cli/angularshots.test.js b/examples/angular-cli/angularshots.test.js index e156d5afbd1..41dfc8a015a 100644 --- a/examples/angular-cli/angularshots.test.js +++ b/examples/angular-cli/angularshots.test.js @@ -1,5 +1,3 @@ -// Needed to prevent "Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten." -import 'core-js/modules/es6.promise'; import path from 'path'; import initStoryshots, { multiSnapshotWithOptions } from '@storybook/addon-storyshots';