Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Running 'mojito test app <app_name>' for the examples in 'developer-guide' returns an error. #525

Closed
zhouyaoji opened this Issue · 6 comments

5 participants

@zhouyaoji
Owner

After you create a new app with Mojto 0.4.4, you can run the following to test the app without
any problems:

$ mojito test app

If you run the same command, however, for the examples in '/examples/developer-guide/':
developer-guide$ mojito test app hello

...you get the following error (truncated):

/opt/local/lib/node_modules/mojito/node_modules/yui/yui-nodejs/yui-nodejs.js:1147
throw (e || new Error(msg));
^
TypeError: Cannot read property 'documentElement' of null

@zhouyaoji
Owner

Related GH issue that was already closed: #387

@dmitris

I see the same error when running
mojito test app .
in any subdirectory of examples/developer-guide/ - for example examples/developer-guide/adding_view_engines or examples/developer-guide/binding_events or examples/developer-guide/configure_routing
The full error is:

dmitris$ mojito test app .
warn: (yui): NOT loaded: mojito
warn: (yui): NOT loaded: mojito
warn: (yui): NOT loaded: mojito
warn: (addon-rs-yui): your mojit "RoutingMojit" has a server affinity and these client-related deps: dom-core, dom-base, node-core, node-base, node-event-delegate, node-pluginhost, dom-style, dom-style-ie, dom-screen, node-screen, node-style
warn: (addon-rs-yui): Mojito may be unable to start, unless you have provided server-side DOM/host-object suppport
warn: (mojito-perf): microtime not found. Recorded times will not have microsecond accuracy
warn: (mojito-perf): microtime not found. Recorded times will not have microsecond accuracy

/Users/dmitris/.nvm/v0.6.21/lib/node_modules/mojito/node_modules/yui/yui-nodejs/yui-nodejs.js:1147
throw (e || new Error(msg));
^
TypeError: Cannot read property 'documentElement' of null
at Object.fn (/Users/dmitris/.nvm/v0.6.21/lib/node_modules/mojito/node_modules/yui/dom-base/dom-base-min.js:7:50)
at [object Object]._attach (/Users/dmitris/.nvm/v0.6.21/lib/node_modules/mojito/node_modules/yui/yui-nodejs/yui-nodejs.js:701:33)
at [object Object]. (/Users/dmitris/.nvm/v0.6.21/lib/node_modules/mojito/node_modules/yui/yui-nodejs/yui-nodejs.js:968:33)
at Object._finish (/Users/dmitris/.nvm/v0.6.21/lib/node_modules/mojito/node_modules/yui/yui-nodejs/yui-nodejs.js:6432:19)
at Object._onSuccess (/Users/dmitris/.nvm/v0.6.21/lib/node_modules/mojito/node_modules/yui/yui-nodejs/yui-nodejs.js:6477:14)
at Object. (/Users/dmitris/.nvm/v0.6.21/lib/node_modules/mojito/node_modules/yui/yui-nodejs/yui-nodejs.js:6674:24)
at [object Object]. (/Users/dmitris/.nvm/v0.6.21/lib/node_modules/mojito/node_modules/yui/yui-nodejs/yui-nodejs.js:6736:30)
at /Users/dmitris/.nvm/v0.6.21/lib/node_modules/mojito/node_modules/yui/yui-nodejs/yui-nodejs.js:3791:26
at /Users/dmitris/.nvm/v0.6.21/lib/node_modules/mojito/node_modules/yui/yui-nodejs/yui-nodejs.js:3814:21
at /Users/dmitris/.nvm/v0.6.21/lib/node_modules/mojito/node_modules/yui/yui-nodejs/yui-nodejs.js:3840:21
mycomp:configure_routing dmitris$
mycomp:configure_routing dmitris$ pwd
/Users/dmitris/dev/hack/mojito/examples/developer-guide/configure_routing
mycomp:configure_routing dmitris$

@drewfish
Owner

I looks like we have a bug in our examples where the binder tests are "common" affinity when they should be "client".

@isao isao referenced this issue from a commit in isao/mojito
@isao isao fix issue #525 `mojito test app|mojit` failed for archetype-code
Support for `mojito test` on client/binder code had been removed,
and binder unit test code would fail. This is now unsupported by
the mojito test runner. This change removes the unsupported
binder tests from the archetypes that `mojito create` uses.
111a714
@isao

examples/developer-guide/adding_view_engines tests are just broken and should be fixed.

spot checking others, many example tests are also broken because they are just the boilerplate tests from mojito create mojit that do not match the actual code.

i.e. examples/developer-guide/simple_view/mojits/simple/tests/controller.server-tests.js has the boilerplate tests

A.areSame('Mojito is working.', results);

...but the controller has a different example. These tests should be deleted.

I thought we had a CI that monitored these?

@isao isao referenced this issue from a commit in isao/mojito
@isao isao fix issue #525 examples fail their unit tests
rm all boilerplate tests
rm all binder tests
2bf9e94
@isao

all tests in develop:examples/ run without error.

as noted in pull #525 tests for these example apps fail (not crash)

  • examples/scroll_views
  • sandbox/binderrender

crashes fixed, test failures to be tracked at issue #731

@isao isao closed this
@lzhan
Owner

@isao: There is no set up for example app tests. We only run functional tests on those example apps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.