From c781fc0a288991bdcc35d6d1ad666db40fdb2ce2 Mon Sep 17 00:00:00 2001 From: Chris Manson Date: Tue, 26 Mar 2019 22:32:32 +0000 Subject: [PATCH] adding failing test --- .../node_modules/example-tar-gz/package.json | 5 +++++ .../node_modules/example-tar-gz/package.json | 5 +++++ tests/fixtures/project-yarn-tar-gz-at-check/yarn.lock | 0 tests/unit/dependency-checker-package-manager-test.js | 5 +++++ 4 files changed, 15 insertions(+) create mode 100644 tests/fixtures/project-npm-tar-gz-at-check/node_modules/example-tar-gz/package.json create mode 100644 tests/fixtures/project-yarn-tar-gz-at-check/node_modules/example-tar-gz/package.json create mode 100644 tests/fixtures/project-yarn-tar-gz-at-check/yarn.lock 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() {