Skip to content

Errors in fresh generated module #5819

@lesyk-lesyk

Description

@lesyk-lesyk

Bug Report or Feature Request (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request

Versions.

@angular/cli: 1.0.0
node: 7.2.0
os: darwin x64

Repro steps.

  1. $ ng new testCLI
  2. $ cd testCLI
  3. $ ng generate module heroes --spec=true --routing=true

The log given by the failure.

  1. $ npm run lint
> test-cli@0.0.0 lint /Users/oleksiy/tmp/testCLI
> ng lint
src/app/heroes/heroes.module.spec.ts[12, 5]: Missing semicolon
Lint errors found in the listed files.
  1. $ npm run test
Chrome 56.0.2924 (Mac OS X 10.10.5) HeroesModule should create an instance FAILED
	TypeError: heroes_module_1.default is not a constructor
	    at Object.<anonymous> (webpack:///src/app/heroes/heroes.module.spec.ts:7:19 <- src/test.ts:24440:24)
	    at ZoneDelegate.invoke (webpack:///~/zone.js/dist/zone.js:365:0 <- src/polyfills.ts:1520:26)
	    at ProxyZoneSpec.Array.concat.ProxyZoneSpec.onInvoke (webpack:///~/zone.js/dist/proxy.js:79:0 <- src/test.ts:52666:39)
	    at ZoneDelegate.invoke (webpack:///~/zone.js/dist/zone.js:364:0 <- src/polyfills.ts:1519:32)
	    at Zone.run (webpack:///~/zone.js/dist/zone.js:125:0 <- src/polyfills.ts:1280:43)
	    at Object.<anonymous> (webpack:///~/zone.js/dist/jasmine-patch.js:104:0 <- src/test.ts:52380:34)
	    at ZoneQueueRunner.Array.concat.jasmine.QueueRunner.ZoneQueueRunner.execute (webpack:///~/zone.js/dist/jasmine-patch.js:132:0 <- src/test.ts:52408:42)
	Expected undefined to be truthy.
	    at Object.<anonymous> (webpack:///src/app/heroes/heroes.module.spec.ts:11:25 <- src/test.ts:24443:30) [ProxyZone]
	    at ProxyZoneSpec.Array.concat.ProxyZoneSpec.onInvoke (webpack:///~/zone.js/dist/proxy.js:79:0 <- src/test.ts:52666:39) [ProxyZone]
	    at Zone.run (webpack:///~/zone.js/dist/zone.js:125:0 <- src/polyfills.ts:1280:43) [<root> => ProxyZone]
	    at Object.<anonymous> (webpack:///~/zone.js/dist/jasmine-patch.js:104:0 <- src/test.ts:52380:34) [<root>]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions