Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- added test for ext classes promoted from modules
- Loading branch information
1 parent
6207d02
commit eb9b270
Showing
4 changed files
with
136 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
StartTest(function(t) { | ||
|
||
t.plan(6) | ||
|
||
// ================================================================================================================================================================================== | ||
t.diag("Creating an Ext class, promoted from module") | ||
|
||
Module('My.Container', { | ||
}) | ||
|
||
t.ok(My.Container, "Class 'My.Container' was created") | ||
t.ok(My.Container.meta instanceof Joose.Namespace.Keeper, '.. and its a Module') | ||
|
||
Class('My.Container', { | ||
isa : Ext.Container | ||
}) | ||
|
||
t.ok(My.Container.meta instanceof JooseX.Bridge.Ext, '.. and it was successfully promoted to the class') | ||
|
||
|
||
// ================================================================================================================================================================================== | ||
t.diag("Further subclassing") | ||
|
||
|
||
Class('Also.My.Container', { | ||
|
||
isa : My.Container | ||
}) | ||
|
||
t.ok(Also.My.Container, "Class 'Also.My.Container' was created") | ||
|
||
|
||
// ================================================================================================================================================================================== | ||
t.diag("Instantiation #1") | ||
|
||
var cont = new My.Container() | ||
|
||
t.ok(cont, "'My.Container' was successfully instantiated") | ||
|
||
|
||
// ================================================================================================================================================================================== | ||
t.diag("Instantiation #2") | ||
|
||
var cont2 = new Also.My.Container() | ||
|
||
t.ok(cont2, "'Also.My.Container' was successfully instantiated") | ||
|
||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters