Skip to content

Commit 77b08e2

Browse files
author
Robert Jackson
authored
Fix in-repo addon acceptance test to demonstrate real world failure with in-repo addons. (#131)
Fix in-repo addon acceptance test to demonstrate real world failure with in-repo addons.
2 parents fd8ba6c + f01237c commit 77b08e2

3 files changed

Lines changed: 11 additions & 1 deletion

File tree

test/fixtures/input/lib/special-sauce/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"ember-addon"
55
],
66
"dependencies": {
7+
"ember-cli-babel": "*",
78
"ember-cli-htmlbars": "*"
89
}
910
}

test/fixtures/output/lib/special-sauce/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"ember-addon"
55
],
66
"dependencies": {
7+
"ember-cli-babel": "*",
78
"ember-cli-htmlbars": "*"
89
}
910
}

test/run-test.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,14 @@ const execOpts = { cwd: inputDir, stderr: 'inherit' };
3030

3131
console.log('running codemod');
3232

33-
await execa('../../../bin/cli.js', ['http://localhost:4200', 'app'], execOpts);
33+
const codemodProcess = execa(
34+
'../../../bin/cli.js',
35+
['http://localhost:4200', 'app', 'lib/special-sauce/addon'],
36+
execOpts
37+
);
38+
codemodProcess.stdout.pipe(process.stdout);
39+
40+
await codemodProcess;
3441

3542
console.log('codemod complete, ending serve');
3643

@@ -40,6 +47,7 @@ const execOpts = { cwd: inputDir, stderr: 'inherit' };
4047

4148
try {
4249
await execa('diff', ['-rq', './app', '../output/app'], execOpts);
50+
await execa('diff', ['-rq', './lib', '../output/lib'], execOpts);
4351
} catch (e) {
4452
console.error('codemod did not run successfully');
4553
console.log(e.stdout);

0 commit comments

Comments
 (0)