Skip to content

Commit fb4b729

Browse files
committed
test for baseDir being picked-up
1 parent e887e54 commit fb4b729

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

test/optionsResolverTests.js

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/optionsResolverTests.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,16 @@ export var tests : nodeunit.ITestGroup = {
341341
test.done();
342342
}).catch((err) => {test.ifError(err); test.done();});
343343
},
344+
"The `baseDir` option is picked-up if passed": (test: nodeunit.Test) => {
345+
test.expect(1);
346+
const config = getConfig("minimalist", true);
347+
config.outDir = 'dist';
348+
config.baseDir = 'src';
349+
const result = or.resolveAsync(null, config).then((result) => {
350+
test.strictEqual(result.baseDir, 'src');
351+
test.done();
352+
}).catch((err) => {test.ifError(err); test.done();});
353+
},
344354
"Task options should override grunt-ts defaults if not specified in the target options": (test: nodeunit.Test) => {
345355
test.expect(2);
346356
const result = or.resolveAsync(getConfig("has ES6 and no sourceMap"), getConfig("minimalist")).then((result) => {

0 commit comments

Comments
 (0)