incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Mueller <pmue...@gmail.com>
Subject Re: using existing AMD implementations with cordova.js
Date Wed, 22 Feb 2012 22:35:19 GMT
On Wed, Feb 22, 2012 at 16:45, Gord Tanner <gord@tinyhippos.com> wrote:

> define.remove is only in place for unit testing (to remove modules that
> were added for testing purposes)
>

makes sense.  But it also means more tests might be affected than I thought.

The way I've tested these things in the past is to load each suite in a
separate iframe.  Actually, that's how the CJS tests that are in there now
are running.  Not a great story, but ... works.  Maybe if we just relegate
those tests to the CJS side of the testing; it's easy enough to add
additional tests there, with it's weird little "program.js" framework
convention.


> The pathing issues are because our module definitions do not line up with
> the folder layout.  This isn't an issue in the browser with almond or our
> require.js because we just define them in a single file anyways.


I didn't see any pathing issues; `jake test` seemed to fail because some
code - I'm assuming this was in the AMD impls, was expecting `navigator` or
`location` to exist, and it didn't.  May require more work to get some of
these AMD impls to run inside node, but prolly not worth the trouble to
even fix.  I'd say if the `jake btests` work with an AMD impl, works for
me; just don't bother testing with `jake test`.

-- 
Patrick Mueller
http://muellerware.org

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message