cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jesse MacFadyen (JIRA)" <>
Subject [jira] [Commented] (CB-1583) Some types are not constructable
Date Thu, 17 Jan 2013 23:48:13 GMT


Jesse MacFadyen commented on CB-1583:

The only remaining place where we are dependent on non-standard object constructors ( not
duck typing, and just checking the properties of the object ) are in the compass tests.

    describe('Compass Heading model (CompassHeading)', function () {
        it("should exist", function() {

        it("should be able to create a new CompassHeading instance with no parameters", function()
            var h = new CompassHeading();
            expect(typeof h.timestamp == 'number').toBe(true);

        it("should be able to create a new CompassHeading instance with parameters", function()
            var h = new CompassHeading(1,2,3,4);
            expect(typeof h.timestamp == 'number').toBe(true);

I can remove these tests, but currently there are several compass implementations that depend
on having constructor args.

I would like to remove the above 3 tests, and modify the individual compass.js files so that
the CompassHeading file is no longer needed.  

I will wait to see if anyone votes this issue up, and leave it as is for now.

> Some types are not constructable
> --------------------------------
>                 Key: CB-1583
>                 URL:
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: mobile-spec
>    Affects Versions: 2.1.0
>            Reporter: Jesse MacFadyen
>            Assignee: Jesse MacFadyen
>             Fix For: 2.4.0
> ex. should be able to define a Position object with coords and timestamp properties
> invalid test.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message