Skip to content

Commit

Permalink
Merge pull request #4929 from storybooks/fix-angular-storyshots
Browse files Browse the repository at this point in the history
Move 'core-js/modules/es6.promise' into storyshots for angular
  • Loading branch information
igor-dv committed Dec 5, 2018
2 parents 1e9e66b + 6117d21 commit 61a5b24
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions 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';

Expand Down

0 comments on commit 61a5b24

Please sign in to comment.