You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by "Jesse MacFadyen (Created) (JIRA)" <ji...@apache.org> on 2012/03/29 23:19:29 UTC

[jira] [Created] (CB-413) Node based tests are useless in Windows

Node based tests are useless in Windows
---------------------------------------

                 Key: CB-413
                 URL: https://issues.apache.org/jira/browse/CB-413
             Project: Apache Callback
          Issue Type: Bug
          Components: CordovaJS
    Affects Versions: 1.5.0
         Environment: Windows
            Reporter: Jesse MacFadyen
            Assignee: Filip Maj
             Fix For: 1.7.0


The node based tests depend on Contextify which is not avaiable for windows.
As a result, I currently have to manually step through code, add console.logs, and alerts, and other less than optimal methods for verifying the correctness of the output code.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-413) Node based tests are useless in Windows

Posted by "Jesse MacFadyen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-413?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13258651#comment-13258651 ] 

Jesse MacFadyen commented on CB-413:
------------------------------------

Yeah, same. Let git take care of the line endings.

Cheers,
  Jesse

Sent from my iPhone5



                
> Node based tests are useless in Windows
> ---------------------------------------
>
>                 Key: CB-413
>                 URL: https://issues.apache.org/jira/browse/CB-413
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: CordovaJS
>    Affects Versions: 1.5.0
>         Environment: Windows
>            Reporter: Jesse MacFadyen
>            Assignee: Filip Maj
>              Labels: PITA
>             Fix For: 1.7.0
>
>
> The node based tests depend on Contextify which is not avaiable for windows.
> As a result, I currently have to manually step through code, add console.logs, and alerts, and other less than optimal methods for verifying the correctness of the output code.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-413) Node based tests are useless in Windows

Posted by "Filip Maj (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-413?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13259793#comment-13259793 ] 

Filip Maj commented on CB-413:
------------------------------

The jakefile no longer removes carriage returns, so it's not the line endings.

It eliminates trailing whitespace and converts tabs to whitespace, so if you are using an IDE that uses hard tabs, that may be the reason why.
                
> Node based tests are useless in Windows
> ---------------------------------------
>
>                 Key: CB-413
>                 URL: https://issues.apache.org/jira/browse/CB-413
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: CordovaJS
>    Affects Versions: 1.5.0
>         Environment: Windows
>            Reporter: Jesse MacFadyen
>            Assignee: Filip Maj
>              Labels: PITA
>             Fix For: 1.7.0
>
>
> The node based tests depend on Contextify which is not avaiable for windows.
> As a result, I currently have to manually step through code, add console.logs, and alerts, and other less than optimal methods for verifying the correctness of the output code.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (CB-413) Node based tests are useless in Windows

Posted by "Filip Maj (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-413?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Filip Maj resolved CB-413.
--------------------------

    Resolution: Fixed

Fixed in [acb911|http://git-wip-us.apache.org/repos/asf?p=incubator-cordova-js.git;a=commit;h=acb911a3cae28dca380ba29621d2fa9a3c991d7e].

Had to dive into the issues list for jsdom and contextify, but figured it out. Updated the README and package.json files to allow for this. Basically:

 * Make sure you are running npm version 1.1.10 at the least (if you run with node v0.6.15 you should be fine).
 * Make sure you have Python 2.7.x installed on your Windows machine.
 * Make sure you have Visual C++ 2010 Express installed (and _not_ the Redistributable - the actual IDE).

Then when you run {{npm install}} it will go through the motions to build contextify for Windows. Works fine on my end now!
                
> Node based tests are useless in Windows
> ---------------------------------------
>
>                 Key: CB-413
>                 URL: https://issues.apache.org/jira/browse/CB-413
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: CordovaJS
>    Affects Versions: 1.5.0
>         Environment: Windows
>            Reporter: Jesse MacFadyen
>            Assignee: Filip Maj
>              Labels: PITA
>             Fix For: 1.7.0
>
>
> The node based tests depend on Contextify which is not avaiable for windows.
> As a result, I currently have to manually step through code, add console.logs, and alerts, and other less than optimal methods for verifying the correctness of the output code.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-413) Node based tests are useless in Windows

Posted by "Anis Kadri (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-413?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13258647#comment-13258647 ] 

Anis Kadri commented on CB-413:
-------------------------------

Hey test work fine but I am getting all my files changed everytime I run jake now and the diff shows:

warning: LF will be replaced by CRLF in lib/exec.js. The file will have its original endings in your working directory.

Anyone else ?
                
> Node based tests are useless in Windows
> ---------------------------------------
>
>                 Key: CB-413
>                 URL: https://issues.apache.org/jira/browse/CB-413
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: CordovaJS
>    Affects Versions: 1.5.0
>         Environment: Windows
>            Reporter: Jesse MacFadyen
>            Assignee: Filip Maj
>              Labels: PITA
>             Fix For: 1.7.0
>
>
> The node based tests depend on Contextify which is not avaiable for windows.
> As a result, I currently have to manually step through code, add console.logs, and alerts, and other less than optimal methods for verifying the correctness of the output code.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-413) Node based tests are useless in Windows

Posted by "Filip Maj (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-413?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13258909#comment-13258909 ] 

Filip Maj commented on CB-413:
------------------------------

That's reasonable.

We should get all of our git configs lined up properly though; Linux and Mac users need to set autocrlf to "input" and Windows users need to set it to "true". See http://help.github.com/line-endings/
                
> Node based tests are useless in Windows
> ---------------------------------------
>
>                 Key: CB-413
>                 URL: https://issues.apache.org/jira/browse/CB-413
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: CordovaJS
>    Affects Versions: 1.5.0
>         Environment: Windows
>            Reporter: Jesse MacFadyen
>            Assignee: Filip Maj
>              Labels: PITA
>             Fix For: 1.7.0
>
>
> The node based tests depend on Contextify which is not avaiable for windows.
> As a result, I currently have to manually step through code, add console.logs, and alerts, and other less than optimal methods for verifying the correctness of the output code.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-413) Node based tests are useless in Windows

Posted by "Anis Kadri (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-413?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13259776#comment-13259776 ] 

Anis Kadri commented on CB-413:
-------------------------------

mine is set to true but I still get all my files modified when I run jake :-) Which forces me to do a git reset --hard
                
> Node based tests are useless in Windows
> ---------------------------------------
>
>                 Key: CB-413
>                 URL: https://issues.apache.org/jira/browse/CB-413
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: CordovaJS
>    Affects Versions: 1.5.0
>         Environment: Windows
>            Reporter: Jesse MacFadyen
>            Assignee: Filip Maj
>              Labels: PITA
>             Fix For: 1.7.0
>
>
> The node based tests depend on Contextify which is not avaiable for windows.
> As a result, I currently have to manually step through code, add console.logs, and alerts, and other less than optimal methods for verifying the correctness of the output code.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-413) Node based tests are useless in Windows

Posted by "Anis Kadri (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-413?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13259807#comment-13259807 ] 

Anis Kadri commented on CB-413:
-------------------------------

I don't use and IDE and I don't use hard tabs :-/
                
> Node based tests are useless in Windows
> ---------------------------------------
>
>                 Key: CB-413
>                 URL: https://issues.apache.org/jira/browse/CB-413
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: CordovaJS
>    Affects Versions: 1.5.0
>         Environment: Windows
>            Reporter: Jesse MacFadyen
>            Assignee: Filip Maj
>              Labels: PITA
>             Fix For: 1.7.0
>
>
> The node based tests depend on Contextify which is not avaiable for windows.
> As a result, I currently have to manually step through code, add console.logs, and alerts, and other less than optimal methods for verifying the correctness of the output code.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-413) Node based tests are useless in Windows

Posted by "Patrick Mueller (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-413?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13241853#comment-13241853 ] 

Patrick Mueller commented on CB-413:
------------------------------------

The Contextify dependency comes via jsdom. 

Note that Contextify is also a problem on the Mac, for some versions of node, due to some confusion re:32/64 bit compilation, or something.

So, it would be good to replace jsdom with something else.

Note, I've already been bugging folks about lingering {{alert()}}'s in the code base, which also do not work in node.  I think we should look at a goal of making the Cordova base built-in plugins runnable in node without hacks like jsdom.  Namely, our own hack.  New module for node, in {{test}} called {{window-emulator.js}} or something, that we require from {{runner.js}}.  Create a new fake window object, add it to node's {{global}}.  I assume bits of {{document}} are required as well.

                
> Node based tests are useless in Windows
> ---------------------------------------
>
>                 Key: CB-413
>                 URL: https://issues.apache.org/jira/browse/CB-413
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: CordovaJS
>    Affects Versions: 1.5.0
>         Environment: Windows
>            Reporter: Jesse MacFadyen
>            Assignee: Filip Maj
>              Labels: PITA
>             Fix For: 1.7.0
>
>
> The node based tests depend on Contextify which is not avaiable for windows.
> As a result, I currently have to manually step through code, add console.logs, and alerts, and other less than optimal methods for verifying the correctness of the output code.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-413) Node based tests are useless in Windows

Posted by "Filip Maj (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-413?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13241857#comment-13241857 ] 

Filip Maj commented on CB-413:
------------------------------

For the record the use of {{alert}} has been completely removed from cordova-js as of [c10b80|http://git-wip-us.apache.org/repos/asf?p=incubator-cordova-js.git;a=commit;h=c10b80eaf886a704fb144019bd869ea8962777bd].
                
> Node based tests are useless in Windows
> ---------------------------------------
>
>                 Key: CB-413
>                 URL: https://issues.apache.org/jira/browse/CB-413
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: CordovaJS
>    Affects Versions: 1.5.0
>         Environment: Windows
>            Reporter: Jesse MacFadyen
>            Assignee: Filip Maj
>              Labels: PITA
>             Fix For: 1.7.0
>
>
> The node based tests depend on Contextify which is not avaiable for windows.
> As a result, I currently have to manually step through code, add console.logs, and alerts, and other less than optimal methods for verifying the correctness of the output code.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira