Skip to content

Commit b472e3d

Browse files
author
Robert Jackson
authored
Merge pull request #40 from xg-wang/dummy
2 parents 0affadc + 0443bfd commit b472e3d

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

lib/utils/get-module-path-for.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@ function getModulePathFor(filePath, addonPaths = ADDON_PATHS, appPaths = APP_PAT
9595
result = `${moduleNameRoot}/test-support${relativePath.slice(18)}`;
9696
} else if (relativePath.startsWith('addon')) {
9797
result = `${moduleNameRoot}${relativePath.slice(5)}`;
98+
} else if (relativePath.startsWith('tests/dummy/app')) {
99+
result = `dummy${relativePath.slice(15)}`;
98100
}
99101
}
100102

lib/utils/get-module-path-for.test.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,14 @@ describe('getModulePathFor', () => {
2525
appPaths
2626
)
2727
).toEqual('special-sauce/test-support/services/whatever');
28+
29+
expect(
30+
getModulePathFor(
31+
'/User/whomever/some-app/lib/special-sauce/tests/dummy/app/services/fire-sauce.js',
32+
addonPaths,
33+
appPaths
34+
)
35+
).toEqual('dummy/services/fire-sauce');
2836
});
2937

3038
test("does not process files in an in-repo addon's app/ folder", () => {

0 commit comments

Comments
 (0)