title: Found the synthetic property @enterAnimation. Please include either "BrowserAnimationsModule" or "NoopAnimationsModule" in your application. Angular4
body: <p>When running Karma to test my Angular4 application, I get this error  <code>Found the synthetic property @enterAnimation. Please include either "BrowserAnimationsModule" or "NoopAnimationsModule" in your application.</code> though I already imported the module in <strong>app.module.ts</strong></p>
  
  <pre><code>        // animation module
          import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; 
      ...
  @NgModule({
      imports: [...
          BrowserAnimationsModule,
          ...
        ],
  </code></pre>
  
  <p>and in my <strong>component</strong>:</p>
  
  <pre><code> import { Component, OnInit } from '@angular/core';
      import {
        trigger,
        state,
        style,
        animate,
        transition
      } from '@angular/animations';
  
      @Component({
        selector: 'app-about',
        animations: [
          trigger(
            'enterAnimation', [
              transition(':enter', [
                style({ transform: 'translateX(100%)', opacity: 0 }),
                animate('500ms', style({ transform: 'translateX(0)', opacity: 1 }))
              ]),
              transition(':leave', [
                style({ transform: 'translateX(0)', opacity: 1 }),
                animate('500ms', style({ transform: 'translateX(100%)', opacity: 0 }))
              ])
            ]
          ),
          trigger(
            'enterAnimationVetically', [
              transition(':enter', [
                style({ transform: 'translateY(100%)', opacity: 0 }),
                animate('500ms', style({ transform: 'translateY(0)', opacity: 1 }))
              ]),
              transition(':leave', [
                style({ transform: 'translateY(0)', opacity: 1 }),
                animate('500ms', style({ transform: 'translateY(100%)', opacity: 0 }))
              ])]
          )
        ],
  ...
  </code></pre>
  
  <p>The application runs perfectly with <code>ng serve</code> yet, I got this error with karma.</p>