diff --git a/tests/fixtures/project-npm-tar-gz-at-check/node_modules/example-tar-gz/package.json b/tests/fixtures/project-npm-tar-gz-at-check/node_modules/example-tar-gz/package.json new file mode 100644 index 0000000..3fd773f --- /dev/null +++ b/tests/fixtures/project-npm-tar-gz-at-check/node_modules/example-tar-gz/package.json @@ -0,0 +1,5 @@ +{ + "name": "example-tar-gz", + "version": "2.0.0", + "_from": "example-tar-gz@http://ember-cli.com/example-2.0.0.tar.gz" +} diff --git a/tests/fixtures/project-yarn-tar-gz-at-check/node_modules/example-tar-gz/package.json b/tests/fixtures/project-yarn-tar-gz-at-check/node_modules/example-tar-gz/package.json new file mode 100644 index 0000000..3fd773f --- /dev/null +++ b/tests/fixtures/project-yarn-tar-gz-at-check/node_modules/example-tar-gz/package.json @@ -0,0 +1,5 @@ +{ + "name": "example-tar-gz", + "version": "2.0.0", + "_from": "example-tar-gz@http://ember-cli.com/example-2.0.0.tar.gz" +} diff --git a/tests/fixtures/project-yarn-tar-gz-at-check/yarn.lock b/tests/fixtures/project-yarn-tar-gz-at-check/yarn.lock new file mode 100644 index 0000000..e69de29 diff --git a/tests/unit/dependency-checker-package-manager-test.js b/tests/unit/dependency-checker-package-manager-test.js index 74274db..a5ca4f6 100644 --- a/tests/unit/dependency-checker-package-manager-test.js +++ b/tests/unit/dependency-checker-package-manager-test.js @@ -112,6 +112,11 @@ describe('EmberCLIDependencyChecker', function() { const project = createProject({ 'example-tar-gz': 'http://ember-cli.com/example-2.0.0.tar.gz' }, { root: 'tests/fixtures/project-'+ packageManagerName + '-tar-gz-check' }); assertNoPackageManagerError(project); }); + + it('when the version specified is a url to a tar.gz and a _from is provided in the package.json with the package-name@ prefix and urls match', function() { + const project = createProject({ 'example-tar-gz': 'http://ember-cli.com/example-2.0.0.tar.gz' }, { root: 'tests/fixtures/project-'+ packageManagerName + '-tar-gz-at-check' }); + assertNoPackageManagerError(project); + }); }); describe('sibling node_modules/ directory', function() {