Skip to content

Uncaught Error: Missing: SyncTestZoneSpec #2036

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
some1awesome opened this issue Sep 9, 2016 · 7 comments
Closed

Uncaught Error: Missing: SyncTestZoneSpec #2036

some1awesome opened this issue Sep 9, 2016 · 7 comments

Comments

@some1awesome
Copy link

Please provide us with the following information:

  1. OS? Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)
    Mac El capitan
  2. Versions. Please run ng --version. If there's nothing outputted, please run
    in a Terminal: node --version and paste the result here:
    angular-cli: 1.0.0-beta.11-webpack.2
    node: 6.2.2
    os: darwin x64
  3. Repro steps. Was this an app that wasn't created using the CLI? What change did you
    do on your code? etc.
    I created this app using the webpack 2 version. Since rc6 was released I upgraded to rc6 and modified all the tests to match the new way of doing them with TestBed instead of addProviders.
  4. The log given by the failure. Normally this include a stack trace and some
    more information.
    Chrome 52.0.2743 (Mac OS X 10.11.6) ERROR
    Uncaught Error: Missing: SyncTestZoneSpec
    at /Users/porteraz/workspace/travel/travel-client/src/test.ts:59883 <- webpack:///Users/porteraz/workspace/travel/travel-client/~/zone.js/dist/jasmine-patch.js:66:0

Chrome 52.0.2743 (Mac OS X 10.11.6) ERROR
Uncaught Error: Missing: SyncTestZoneSpec
at /Users/porteraz/workspace/travel/travel-client/src/test.ts:59883 <- webpack:///Users/porteraz/workspace/travel/travel-client/~/zone.js/dist/jasmine-patch.js:66:0

  1. Mention any other details that might be useful.

According to this github issue in zone.js:
angular/zone.js#404

We need to add the following to the config/karma-test-shim.js (or config/spec-bundle.js):

require('zone.js/dist/proxy'); // since zone.js 0.6.15
require('zone.js/dist/jasmine-patch'); // put here since zone.js 0.6.14

But I can't find a karma-test-shim.js to update.


Thanks! We'll be in touch soon.

@hschoefer
Copy link

hschoefer commented Sep 10, 2016

I have the same problem with Ubuntu 16.04 LTS after changing from [email protected] to the angular-cli@webpack.

angular-cli: git master
node: 6.2.1, 6.3.1, 6.5.0
os: Ubuntu 16.04 LTS 64 Bit

@zackporter92 The official instruction for the change says that some file not needed anymore. One of this file is karma-test-shim.js.

Update
With Node 6.3.1 I get a message that angular-cli-build.js can't be found. Which isn't needed, too, if the instruction manual is correct.
Sry, my first update isn't correct. I didn't link git master version correct.

@hschoefer
Copy link

hschoefer commented Sep 11, 2016

As far as I can see I found the problem. I took a look into angular-cli template files and ended at test.ts (1). This file has one import more than my test.ts file and the order of the imports were different.

(1) https://github.com/angular/angular-cli/blob/master/addon/ng2/blueprints/ng2/files/__path__/test.ts#L3-L8

Now I'm getting an other error which says that a provider for a component can't be found. I think this indicates that the original problem is solved.

@filipesilva
Copy link
Contributor

This is currently added in beta.14, under src/test.ts.

@Angelmmiguel
Copy link

@Hirse
Copy link
Contributor

Hirse commented Mar 30, 2017

Location changed again:
https://github.com/angular/angular-cli/blob/master/packages/@angular/cli/blueprints/ng/files/__path__/test.ts

@RoestVrijStaal
Copy link

Thanks for the person who deleted the blueprints directory 😡 😡 😡

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 7, 2019
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

6 participants