Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Error: Missing: SyncTestZoneSpec #407

Closed
monkeychops opened this issue Aug 18, 2016 · 13 comments
Closed

Error: Missing: SyncTestZoneSpec #407

monkeychops opened this issue Aug 18, 2016 · 13 comments

Comments

@monkeychops
Copy link

tests are failing webpack:///~/zone.js/dist/jasmine-patch.js:66:0

@fbmfbm
Copy link

fbmfbm commented Aug 18, 2016

regression to v.0.6.12 is ok but v.0.6.14 give me this to.

@elhigu
Copy link

elhigu commented Aug 18, 2016

0.6.13 was also ok. I'm getting the same error with 0.6.14.

We are using angular2-webapack-starter

@crehn
Copy link

crehn commented Aug 18, 2016

I have the same problem. 0.6.13 is OK, 0.6.14 throws the error when running karma tests. Steps to reproduce:

git clone https://github.com/angular/quickstart.git
cd quickstart
npm install
npm test

The problem seems to have been introduced with PR #402. @jelbourn even comments the corresponding lines in the PR.

crehn added a commit to crehn/archimedes that referenced this issue Aug 18, 2016
DorianGrey added a commit to flaviait/ng2-jspm-template that referenced this issue Aug 22, 2016
Due to unlikely errors like angular/zone.js#407 raised by minor version differences.
@JurajMlich
Copy link

#404

@crehn
Copy link

crehn commented Aug 22, 2016

This appears to be the same problem (i.e. duplicate), you are right. Having to update the imports is a breaking change, though. But I guess as zone.js still major version 0, this is semver compliant. OK.

@HeavenlyHost
Copy link

Also having problem with Angular 2 RC6, I found this problem when trying to unit test under karma and jasmine ?
Karma: 1.2.0
Karma chrome launcher: 2.0.0
Karma jasmine: 1.0.2
Jasmine-core: 2.5.0

@JurajMlich
Copy link

@HeavenlyHost have a look at #404

@crh225
Copy link

crh225 commented Sep 7, 2016

had to change my code to fro rc6:

require('ts-helpers');

require('zone.js/dist/zone');
require('zone.js/dist/long-stack-trace-zone');
require('zone.js/dist/proxy'); // since zone.js 0.6.15
require('zone.js/dist/sync-test');
require('zone.js/dist/jasmine-patch'); // put here since zone.js 0.6.14
require('zone.js/dist/async-test');
require('zone.js/dist/fake-async-test');

// RxJS
require('rxjs/Rx');

var testing = require('@angular/core/testing');
var browser = require('@angular/platform-browser-dynamic/testing');

testing.TestBed.initTestEnvironment(
  browser.BrowserDynamicTestingModule,
  browser.platformBrowserDynamicTesting()
);

@HeavenlyHost
Copy link

Adding the following

testing.TestBed.initTestEnvironment(
browser.BrowserDynamicTestingModule,
browser.platformBrowserDynamicTesting()
);

helped... I think the confusing part is that I think others are using webpack where as I am still using system :-(

Also can I just say that for my testing I am using...

Karma: 1.2.0
Karma chrome launcher: 2.0.0
Karma jasmine: 1.0.2
Jasmine-core: 2.5.0

is there somewhere on the web that provides a descent example of how to build a test environment using these tools with Angular 2 rc6 ?

@monkeychops
Copy link
Author

awesome!

Managed to get mine working with webpack and RC6 by using the following config taken from the angular2-webpack-starter project

https://github.com/AngularClass/angular2-webpack-starter/blob/master/config/spec-bundle.js

@coldhavok
Copy link

@monkeychops solutions works great for me.

@ghost
Copy link

ghost commented Oct 6, 2016

@monkeychops also worked for me

@dessalines
Copy link

I got this error again in [email protected].

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants