Testando o serviço Angular 2 com mocha

Estou tentando implementar testes de unidade para um aplicativo Angular 2. Mas não consigo fazer funcionar. Como corredor de testemocha é usado e executado assim:

mocha -r ts-node/register -t 10000 ./**/*.unit.ts

Considere o seguinte arquivo de teste, onde defino dois casos de teste que basicamente devem fazer a mesma coisa, mas nenhum deles está funcionando.

shared.service.unit.ts

import { TestBed, async, inject } from '@angular/core/testing';
import { SharedService } from './shared.service';
import * as Chai from 'chai';
import 'mocha';
const expect = Chai.expect;

describe('SharedService', () => {

    beforeEach(() => {
        TestBed.configureTestingModule({
            declarations: [SharedService],
            providers: [SharedService]
        });
    });

    it('should be an object',
        inject([SharedService], (service: SharedService) => {
            expect(service).to.be.an('object');
        })
    );
});

describe('SharedService without the TestBed', () => {
    let service: SharedService;

    beforeEach(() => { 
        service = new SharedService();
    });

    it('should be an object', () => {
        expect(service).to.be.an('object');
    });
});

O primeiro'SharedService' usa oUtilitário de teste angular. Executá-lo fornece:

ReferenceError: a zona não está definida

O segundo'SharedService without TestBed'não usa nenhum código angular (semelhante aeste exemplo do guia de teste do Angular 2) Executá-lo fornece:

TypeError: Reflect.getMetadata não é uma função

Depois de adicionar essas linhas ao arquivo de teste:

import 'core-js/es6';
import 'core-js/es7/reflect';
import 'zone.js/dist/zone';

Ambos os casos de teste apresentam o mesmo erro (dezone.js\dist\zone.js):

TypeError: Não é possível ler a propriedade 'prototype' de undefined

O que estou fazendo errado?

questionAnswers(2)

yourAnswerToTheQuestion