File tree 2 files changed +10
-3
lines changed
2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change 28
28
*/
29
29
local ImpTestCase = class {
30
30
31
- static version = [ 0 , 5 , 0 ] ;
31
+ static VERSION = " 1.0.0 " ;
32
32
33
33
runner = null ; // runner instance
34
34
session = null ; // session name
Original file line number Diff line number Diff line change @@ -84,7 +84,14 @@ local ImpUnitRunner = class {
84
84
local testCases = {};
85
85
86
86
foreach (rootKey, rootValue in getroottable ()) {
87
- if (type (rootValue) == " class" && rootValue. getbase () == ImpTestCase) {
87
+ if (type (rootValue) == " class" ) {
88
+ local bc = rootValue. getbase ();
89
+ while (bc != null && bc != ImpTestCase) {
90
+ bc = bc. getbase ();
91
+ }
92
+ if (bc != ImpTestCase) {
93
+ continue;
94
+ }
88
95
if (testClass. len () > 0 && testClass != rootKey) {
89
96
continue;
90
97
}
@@ -238,7 +245,7 @@ local ImpUnitRunner = class {
238
245
}
239
246
240
247
// detect if test is async
241
- test. async <- test.result instanceof Promise;
248
+ test. async <- "Promise" in getroottable() && test. result instanceof Promise;
242
249
243
250
if (test. async ) {
244
251
You can’t perform that action at this time.
0 commit comments