diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-05-26 17:43:44 +0300 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-05-26 17:43:44 +0300 |
commit | c197b72feaf985b1a93715dfd6d6a13cde121e7b (patch) | |
tree | a67830744af1c32b26a7b04665b0eb94c8cb4a4a /spec/lib/gitlab/dependency_linker | |
parent | 31b02fc210ffcde72a9d7882ab07979ed18a023b (diff) |
Add spec
Diffstat (limited to 'spec/lib/gitlab/dependency_linker')
-rw-r--r-- | spec/lib/gitlab/dependency_linker/package_json_linker_spec.rb | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/spec/lib/gitlab/dependency_linker/package_json_linker_spec.rb b/spec/lib/gitlab/dependency_linker/package_json_linker_spec.rb index b5f2c387d6f..8c979ae1869 100644 --- a/spec/lib/gitlab/dependency_linker/package_json_linker_spec.rb +++ b/spec/lib/gitlab/dependency_linker/package_json_linker_spec.rb @@ -24,12 +24,16 @@ describe Gitlab::DependencyLinker::PackageJsonLinker, lib: true do "url": "https://github.com/vuejs/vue.git" }, "homepage": "https://github.com/vuejs/vue#readme", + "scripts": { + "karma": "karma start config/karma.config.js --single-run" + }, "dependencies": { "primus": "*", "async": "~0.8.0", "express": "4.2.x", "bigpipe": "bigpipe/pagelet", - "plates": "https://github.com/flatiron/plates/tarball/master" + "plates": "https://github.com/flatiron/plates/tarball/master", + "karma": "^1.4.1" }, "devDependencies": { "vows": "^0.7.0", @@ -69,6 +73,7 @@ describe Gitlab::DependencyLinker::PackageJsonLinker, lib: true do expect(subject).to include(link('express', 'https://npmjs.com/package/express')) expect(subject).to include(link('bigpipe', 'https://npmjs.com/package/bigpipe')) expect(subject).to include(link('plates', 'https://npmjs.com/package/plates')) + expect(subject).to include(link('karma', 'https://npmjs.com/package/karma')) expect(subject).to include(link('vows', 'https://npmjs.com/package/vows')) expect(subject).to include(link('assume', 'https://npmjs.com/package/assume')) expect(subject).to include(link('pre-commit', 'https://npmjs.com/package/pre-commit')) @@ -81,5 +86,9 @@ describe Gitlab::DependencyLinker::PackageJsonLinker, lib: true do it 'links Git repos' do expect(subject).to include(link('https://github.com/flatiron/plates/tarball/master', 'https://github.com/flatiron/plates/tarball/master')) end + + it 'does not link scripts with the same key as a package' do + expect(subject).not_to include(link('karma start config/karma.config.js --single-run', 'https://github.com/karma start config/karma.config.js --single-run')) + end end end |