Skip to content
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

karma tests #4

Closed
chris-house opened this issue Aug 12, 2016 · 7 comments
Closed

karma tests #4

chris-house opened this issue Aug 12, 2016 · 7 comments

Comments

@chris-house
Copy link
Contributor

cannot get tests to run.

I used npm run test and get the following errors:

npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs
node_modules\npm\bin\npm-cli.js" "run" "tslint" "Client/**/.ts"
npm ERR! node v4.4.7
npm ERR! npm v2.15.8
npm ERR! code ELIFECYCLE
npm ERR! aspnetnetcore@0.0.0 tslint: tslint "Client/**/_.ts"
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the aspnetnetcore@0.0.0 tslint script 'tslint "Client/__/_.ts
"'.
npm ERR! This is most likely a problem with the aspnetnetcore package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! tslint "Client/
/.ts"
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs aspnetnetcore
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR! npm owner ls aspnetnetcore
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\housec\Downloads\AspNetCoreSpa-master (1)\AspNetCoreSpa-ma
ster\npm-debug.log

npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs
node_modules\npm\bin\npm-cli.js" "run" "lint"
npm ERR! node v4.4.7
npm ERR! npm v2.15.8
npm ERR! code ELIFECYCLE
npm ERR! aspnetnetcore@0.0.0 lint: npm run tslint "Client/**/*.ts"
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the aspnetnetcore@0.0.0 lint script 'npm run tslint "Client/*
/.ts"'.
npm ERR! This is most likely a problem with the aspnetnetcore package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm run tslint "Client/*/.ts"
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs aspnetnetcore
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR! npm owner ls aspnetnetcore
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\housec\Downloads\AspNetCoreSpa-master (1)\AspNetCoreSpa-ma
ster\npm-debug.log

npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Users\housec\AppData
\Roaming\npm\node_modules\npm\bin\npm-cli.js" "run" "test"
npm ERR! node v4.4.7
npm ERR! npm v3.10.5
npm ERR! code ELIFECYCLE
npm ERR! aspnetnetcore@0.0.0 pretest: npm run lint
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the aspnetnetcore@0.0.0 pretest script 'npm run lint'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the aspnetnetcore package
,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm run lint
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs aspnetnetcore
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls aspnetnetcore
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\housec\Downloads\AspNetCoreSpa-master (1)\AspNetCoreSpa-ma
ster\npm-debug.log

@asadsahi
Copy link
Collaborator

Thanks for letting me know.

According to angular.io docs, testing guidelines aren't final yet, so I will hang on, before making changes as per RC5 in this project.

@chris-house
Copy link
Contributor Author

Demo is down again. http://aspnetcorespa.azurewebsites.net/

Is there anything I can help work on?

@asadsahi
Copy link
Collaborator

asadsahi commented Aug 15, 2016

Hi @crh225 , thanks for the offer. Sure, there is always something which can be improved. :)

Few things pending are:

  1. Client unit tests
  2. Production build with webpack is broken since RC5 upgrade. Probably new angular compiler needs to bring in the mix. Not sure though, so this is something can be picked up as well.
  3. Server side unit tests.

Any other good idea? I am happy to accept any pull requests.

@chris-house
Copy link
Contributor Author

@asadsahi, I don't know if there's any other way of asking my questions than through comments on issues, but what do the plus signs mean in the components? Is this something new in rc5, or just a convention you use?

@chris-house
Copy link
Contributor Author

Accoring to http://stackoverflow.com/questions/38895087/tests-are-failing-after-angular-2-rc5, angular removed references to jasmine in @angular/core/testing

Need to install typings for jasmin globally: typings install jasmin --source dt --global

all spec files need to be changed apparently. beforeEachProviders becomes beforeEach, and we need to remove the unnecessary imports.

When I got kamra working, four of the tests were failing, but I fixed those.

I have fixed all the tests and am creating a pull request

@chris-house
Copy link
Contributor Author

chris-house commented Aug 15, 2016

Issue is fixed in pull request: #5

@asadsahi
Copy link
Collaborator

asadsahi commented Aug 15, 2016

@crh225 thanks for helping. I have merge the pull request.

plus signs are conventions to prefix folder with modules which will be lazily loaded as explained in angular 2 guidelines here.

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

No branches or pull requests

2 participants