| 1 |
"use strict"; |
| 2 |
|
| 3 |
var pg = require("path").resolve(__dirname, "../__playground"); |
| 4 |
|
| 5 |
module.exports = { |
| 6 |
Default: function (t, a, d) { |
| 7 |
t("ignore", pg + "/test/module.js")(function (context) { a(context, global); }).done(d); |
| 8 |
}, |
| 9 |
Custom: { |
| 10 |
"": function (t, a, d) { |
| 11 |
var path = pg + "/test/context/"; |
| 12 |
t( |
| 13 |
"ignore", path + "module.js" |
| 14 |
)(function (context) { a(context.x, require(path + "__tad").context.x); }).done(d); |
| 15 |
}, |
| 16 |
"Nested": function (t, a, d) { |
| 17 |
var path = pg + "/test/context/context/", o = { x: {} }; |
| 18 |
t( |
| 19 |
o, path + "module.js" |
| 20 |
)(function (context) { a(context.x, require(path + "__tad").context(o).x); }).done(d); |
| 21 |
}, |
| 22 |
"Nested fallback": function (t, a, d) { |
| 23 |
var path = pg + "/test/context/"; |
| 24 |
t( |
| 25 |
"ignore", path + "/dir/module.js" |
| 26 |
)(function (context) { a(context.x, require(path + "__tad").context.x); }).done(d); |
| 27 |
} |
| 28 |
} |
| 29 |
}; |