Unit Test Framework and circular references...

4 views
Skip to first unread message

Jon Bomgardner

unread,
Jun 20, 2009, 10:47:31 PM6/20/09
to Clientcide
Is there a way to make the test framework play nicely with circular
references?

For instance, I have a class Toolbar that has a dependency on
Toolbar.Container. The container obviously needs to be defined after
Toolbar due to the namespace dependency. The Unit Test framework just
chokes when I have the following defined in my scripts.json file:

"Toolbar": {

"toolbar": {
"deps": ["common","container"]
},

"container": {
"deps": ["common","toolbar"]
},

"toolbar.item": {
"deps": ["tab","toolbar"]
},

"toolbar.separator": {
"deps": ["toolbar"]
}
}

Can this be worked out somehow or should I just do my best to avoid
circular references?

Thanks,
jonlb

Aaron Newton

unread,
Jun 20, 2009, 11:29:14 PM6/20/09
to clien...@googlegroups.com
What do you intend to happen with these circular references? I really don't see how any builder would handle these well.

In theory, yes, the circular reference could be handled, but I don't have time to make it do so. You can fork it on github, make your fix, and send me a pull request and I'll review it (if you want to spend the time).

Aaron
Reply all
Reply to author
Forward
0 new messages