mirror of
https://github.com/hanzoai/ts-node.git
synced 2026-10-30 19:36:25 +00:00
* re-add scope and scopeDir to CLI; add env vars * fix tests and bug found by tests * Fix typo
27 lines
468 B
JavaScript
27 lines
468 B
JavaScript
let failures = 0;
|
|
try {
|
|
// This should fail with an error because it is outside scopedir
|
|
require('./scopedir/index');
|
|
failures++;
|
|
} catch (e) {
|
|
// good
|
|
}
|
|
|
|
try {
|
|
// This should fail with an error because it is outside scopedir
|
|
require('./config/index');
|
|
failures++;
|
|
} catch (e) {
|
|
// good
|
|
}
|
|
|
|
try {
|
|
// this should succeed
|
|
console.log(require('./config/scopedir/index').a);
|
|
} catch (e) {
|
|
// bad
|
|
failures++;
|
|
}
|
|
|
|
console.log(`Failures: ${failures}`);
|