summaryrefslogtreecommitdiff
path: root/spec/integration/js/bower_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/integration/js/bower_spec.rb')
-rw-r--r--spec/integration/js/bower_spec.rb14
1 files changed, 10 insertions, 4 deletions
diff --git a/spec/integration/js/bower_spec.rb b/spec/integration/js/bower_spec.rb
index 6d51394..227718e 100644
--- a/spec/integration/js/bower_spec.rb
+++ b/spec/integration/js/bower_spec.rb
@@ -11,7 +11,7 @@ RSpec.describe "bower" do
end
specify { expect(subject).to match_schema }
- specify { expect(subject.dependency_names).to match_array(['cli', 'ev-emitter', 'example-project', 'fizzy-ui-utils', 'get-size', 'jquery', 'masonry-layout', 'matches-selector', 'outlayer', 'stimulus.umd']) }
+ specify { expect(subject.dependency_names).to match_array(['debug', 'cli', 'ev-emitter', 'example-project', 'fizzy-ui-utils', 'get-size', 'jquery', 'masonry-layout', 'matches-selector', 'outlayer', 'stimulus.umd']) }
specify { expect(subject.licenses_for('cli')).to match_array(['Apache-2.0', 'BSD-2-Clause', 'BSD-3-Clause', 'ISC', 'MIT']) }
specify { expect(subject.licenses_for('ev-emitter')).to match_array(['MIT']) }
specify { expect(subject.licenses_for('example-project')).to match_array(['ISC']) }
@@ -24,10 +24,15 @@ RSpec.describe "bower" do
specify { expect(subject.licenses_for('stimulus.umd')).to match_array(['unknown']) }
end
- context "when scanning a bower project with a dependency from a custom npm registry", environment: 'offline' do
- subject { runner.scan(env: { 'ADDITIONAL_CA_CERT_BUNDLE' => fixture_file_content('js/custom-npm.crt') }) }
+ context "when scanning a bower project with a dependency from a custom npm registry" do
+ subject { runner.scan(env: { 'ADDITIONAL_CA_CERT_BUNDLE' => x509_certificate('wildcard.test').read }) }
+
+ let(:private_npm_host) { 'npm.test' }
before do
+ add_host(private_npm_host, '127.0.0.1')
+ start_proxy_server
+
runner.add_file(".npmrc", "registry = https://#{private_npm_host}")
runner.add_file(".bowerrc") do
JSON.pretty_generate({ resolvers: ['bower-npm-resolver'] })
@@ -42,7 +47,8 @@ RSpec.describe "bower" do
end
specify { expect(subject).to match_schema }
- specify { expect(subject.dependency_names).to match_array(%w[js-bower lodash]) }
+ specify { expect(subject.dependency_names).to match_array(%w[debug js-bower lodash]) }
+ specify { expect(subject.licenses_for('debug')).to match_array(['unknown']) }
specify { expect(subject.licenses_for('js-bower')).to match_array(['ISC']) }
specify { expect(subject.licenses_for('lodash')).to match_array(['MIT']) }
end