I followed this tutorial to test an Angular 2 application: https://angular.io/docs/ts/latest/guide/testing.html
Having finished the First app test section and switched to unit-tests.html , I saw several specifications reports:

Although I have not made any changes to the tutorial code, for a quick reference, here is my unit-tests.html:
<!DOCTYPE html> <html> <head> <meta http-equiv="content-type" content="text/html;charset=utf-8"> <title>Ng App Unit Tests</title> <link rel="stylesheet" href="node_modules/jasmine-core/lib/jasmine-core/jasmine.css"> <script src="node_modules/jasmine-core/lib/jasmine-core/jasmine.js"></script> <script src="node_modules/jasmine-core/lib/jasmine-core/jasmine-html.js"></script> <script src="node_modules/jasmine-core/lib/jasmine-core/boot.js"></script> </head> <body> <script src="node_modules/systemjs/dist/system-polyfills.js"></script> <script src="node_modules/systemjs/dist/system.src.js"></script> <script> </script> </body> </html>
hero.spec.ts
import {Hero} from './hero'; describe('Hero', () => { it('has name', () => { let hero:Hero = {id: 1, name: 'Super Cat'}; expect(hero.name).toEqual('Super Cat'); }); it('has id', () => { let hero:Hero = {id: 1, name: 'Super Cat'}; expect(hero.id).toEqual(1); }); });
Any idea what could go wrong?
source share