Closed ronaksbhavsar closed 7 years ago
Please confirm you have performed the following steps:
git clone git@github.com:lathonez/clicker.git
cd clicker
npm install
npm test
yes i have followed above steps
still same
paste the output of the following:
node --version
npm list -g --depth=0
please check above screenshot
Should be fine I think.
Does npm start
work ok?
yes it's working fine when i run npm start , I am new to karma and jasmine for ionic 2 .
@lathonez Hi, please update me if you have found anything
Nothing concrete, sorry.
Try:
After you've done that:
npm cache clean
and these steps again.
If you want to try to debug it yourself, you need to figure out why no specs are being found.
This line here: https://github.com/lathonez/clicker/blob/master/src/test.ts#L36 is a good starting point
ok
BEFORE you do that, can you paste the entire output of npm test
.
Please copy and paste (no screenshot).
ok
@lholznagel I have updated node to 6.5.0 , Typescript is already 2.0.7 and installed node modules again. still same
before Upgrading Node
Clicker@2.3.0 test E:\ ng test --code-coverage
22 11 2016 14:51:02.051:WARN [karma]: No captured browser, open http://localhost:9876/ 22 11 2016 14:51:02.051:INFO [karma]: Karma v1.3.0 server started at http://localhost:9876/ 22 11 2016 14:51:02.051:INFO [launcher]: Launching browser Chrome with unlimited concurrency 22 11 2016 14:51:02.309:INFO [launcher]: Starting browser Chrome 22 11 2016 14:51:05.749:INFO [Chrome 56.0.2922 (Windows 10 0.0.0)]: Connected on socket /#lyKl8I9gcQo-HU7zAAAA with id 4991 5639
START:
Finished in 0.002 secs / 0 secs
SUMMARY: √ 0 tests completed
Apply this diff for debug:
diff --git a/src/test.ts b/src/test.ts
index d12d17f..ca87bd3 100644
--- a/src/test.ts
+++ b/src/test.ts
@@ -33,7 +33,7 @@ Promise.all([
);
})
// Then we find all the tests.
- .then(() => require.context('./', true, /\.spec\.ts/))
+ .then(() => require.context('./pages/page2/'))
// And load the modules.
.then(context => context.keys().map(context))
// Finally, start Karma to run the tests.
run again and paste the output
ok
Apply the diff and paste the output of npm test.
On 22 Nov 2016 22:05, "ronaksbhavsar" notifications@github.com wrote:
How to debug tests?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/lathonez/clicker/issues/178#issuecomment-262212019, or mute the thread https://github.com/notifications/unsubscribe-auth/AG5tSJiJnim8MeELj8saPWfRFx6FzngTks5rAsxfgaJpZM4K5Jmc .
Still same E:\clicker>npm test
Clicker@2.3.0 test E:\clicker ng test --code-coverage
22 11 2016 16:43:39.118:WARN [karma]: No captured browser, open http://localhost:9876/ 22 11 2016 16:43:39.133:INFO [karma]: Karma v1.3.0 server started at http://localhost:9876/ 22 11 2016 16:43:39.133:INFO [launcher]: Launching browser Chrome with unlimited concurrency 22 11 2016 16:43:39.313:INFO [launcher]: Starting browser Chrome 22 11 2016 16:43:40.938:INFO [Chrome 56.0.2922 (Windows 10 0.0.0)]: Connected on socket /#_Jz5YATKLlf85fM7AAAA with id 3159 998
START:
Finished in 0.002 secs / 0 secs
SUMMARY: √ 0 tests completed
try using ng-cli directly:
npm install -g angular-cli
ng new PROJECT_NAME
cd PROJECT_NAME
ng test
@lathonez can you please help me out from this issue?
Hi @lathonez , I have created new project by given commands. and logs are given below:
Microsoft Windows [Version 10.0.14393] (c) 2016 Microsoft Corporation. All rights reserved.
E:\CLI-testProject>ng test 25 11 2016 11:19:36.455:WARN [karma]: No captured browser, open http://localhost:9876/ 25 11 2016 11:19:36.465:INFO [karma]: Karma v1.2.0 server started at http://localhost:9876/ 25 11 2016 11:19:36.465:INFO [launcher]: Launching browser Chrome with unlimited concurrency 25 11 2016 11:19:36.465:INFO [launcher]: Starting browser Chrome 25 11 2016 11:19:42.818:INFO [Chrome 56.0.2922 (Windows 10 0.0.0)]: Connected on socket /#5G04u69L8P0zPFMUAAAA with id 6892 4662 Chrome 56.0.2922 (Windows 10 0.0.0): Executed 3 of 3 SUCCESS (0.433 secs / 0.423 secs)
it's working fine in mac. i have tested it
it's working fine it was throwing an exception in debugger
thanks for your support
I am away currently away. Will pick this up when I return. Sometime mid December.
On 25 Nov 2016 19:08, "ronaksbhavsar" notifications@github.com wrote:
angular/angular-cli#2125 https://github.com/angular/angular-cli/issues/2125
— You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/lathonez/clicker/issues/178#issuecomment-262934135, or mute the thread https://github.com/notifications/unsubscribe-auth/AG5tSKeDvejaCD1zsIPZTTudC0x9YHU2ks5rBsG2gaJpZM4K5Jmc .
Hi, It's been Resolved
Can you tell us what you did to resolve it?
I have added this code for typescript to identify mime type for browser
For the lazy in karma.conf.js : mime: { 'text/x-typescript': ['ts', 'tsx'] }
@andrewgy8 - should I be adding this to karma.conf.js?
I had the same issue as @ronaksbhavsar, and that seemed to do the trick. Edit: Yes.
5c0ffeb (will push in a bit)
yes, you should add
@lathonez Why you blocked me into gitter into 'clicker ' room?
I removed the room, no one uses it.
@lathonez ok, can i comment here for issues?
@lathonez Actually i want to debug protractor, do you know how to debug through visual studio code?
I can confirm that the mime type setting in karma already there in my 2 projects, one working and the other don't is not the solution.
I am thinking in something related with the libraries versions from angular saying 4.1.2, working one had 4.1.1 and after upgrade failing, it got 4.1.3 that is working properly.
Unfortunatly from the yarn upgrade I can't reproduce it now, both project have testing working properly. Anyway, just to notice output ng version from 0 test (having tests inside) run project:
@angular/cli: 1.0.1
node: 7.3.0
os: win32 x64
@angular/common: 4.1.2
@angular/compiler: 4.1.2
@angular/core: 4.1.2
@angular/forms: 4.1.2
@angular/http: 4.1.2
@angular/platform-browser: 4.1.2
@angular/platform-browser-dynamic: 4.1.2
@angular/router: 4.1.2
@angular/cli: 1.0.1
@angular/compiler-cli: 4.1.2
Hope this helps.
Regards