Skip to content

Commit

Permalink
Add test for case outputFile having subpath
Browse files Browse the repository at this point in the history
  • Loading branch information
SparshithNR committed Feb 20, 2020
1 parent a3cf3a4 commit 155f6f5
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/simple-concat-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,17 @@ describe('simple-concat', function() {
expectFile('all-inner.js').withoutSrcURL().in(builder.outputPath);
});

it('concatenates outputFile path has subpath', async function() {
let node = concat(firstFixture, {
outputFile: 'sub-path/sub-sub-path/all-inner.js',
inputFiles: ['inner/*.js'],
sourceMapConfig: { enabled: false }
});
builder = new broccoli.Builder(node);
await builder.build();
expectFile('all-inner.js').withoutSrcURL().in(path.join(builder.outputPath, 'sub-path/sub-sub-path/'));
});

it('concatenates files across dirs', async function() {
let node = concat(firstFixture, {
outputFile: '/all.js',
Expand Down
11 changes: 11 additions & 0 deletions test/sourcemap-concat-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,17 @@ describe('sourcemap-concat', function() {
expectValidSourcemap('all-inner.js').in(builder.outputPath);
});

it('concatenates outputFile path has subpath', async function() {
let node = concat(firstFixture, {
outputFile: 'sub-path/sub-sub-path/all-inner.js',
inputFiles: ['inner/*.js'],
sourceMapConfig: { enabled: false }
});
builder = new broccoli.Builder(node);
await builder.build();
expectFile('all-inner.js').withoutSrcURL().in(path.join(builder.outputPath, 'sub-path/sub-sub-path/'));
});

it('concatenates files across dirs', async function() {
let node = concat(firstFixture, {
outputFile: '/all.js',
Expand Down

0 comments on commit 155f6f5

Please sign in to comment.