Installations
npm install blocking-proxy
Score
95.9
Supply Chain
97.3
Quality
75.3
Maintenance
100
Vulnerability
100
License
Releases
Unable to fetch releases
Contributors
Developer
angular
Developer Guide
Module System
CommonJS
Min. Node Version
>=6.9.x
Typescript Support
No
Node Version
6.11.2
NPM Version
5.4.2
Statistics
48 Stars
78 Commits
36 Forks
13 Watching
3 Branches
19 Contributors
Updated on 27 Sept 2024
Bundle Size
16.79 kB
Minified
5.19 kB
Minified + Gzipped
Languages
JavaScript (62.5%)
TypeScript (33.44%)
Shell (4.06%)
Total Downloads
Cumulative downloads
Total Downloads
343,437,698
Last day
-6.6%
149,905
Compared to previous day
Last week
-0.3%
787,811
Compared to previous week
Last month
9.2%
3,443,361
Compared to previous month
Last year
-18%
41,741,489
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
1
Dev Dependencies
26
jasminewd2
Adapter for Jasmine-to-WebDriverJS. Used by Protractor.
Important: There are two active branches of jasminewd.
- jasminewd1 is an adapter for Jasmine 1.3, and uses the package minijasminenode. It is published to npm as
jasminewd
. - jasminewd2 is an adapter for Jasmine 2.x, and uses the package jasmine. It is published to npm as
jasminewd2
.
Features
-
Automatically makes tests asynchronously wait until the WebDriverJS control flow is empty.
-
If a
done
function is passed to the test, waits for both the control flow and until done is called. -
If a test returns a promise, waits for both the control flow and the promise to resolve.
-
Enhances
expect
so that it automatically unwraps promises before performing the assertion.
Installation
npm install jasminewd2
Usage
In your setup:
1var JasmineRunner = require('jasmine'); 2var jrunner = new JasmineRunner(); 3var webdriver = require('selenium-webdriver'); 4 5global.driver = new webdriver.Builder(). 6 usingServer('http://localhost:4444/wd/hub'). 7 withCapabilities({browserName: 'chrome'}). 8 build(); 9 10require('jasminewd2').init(driver.controlFlow(), webdriver); 11 12jrunner.projectBaseDir = ''; 13jrunner.execute(['**/*_spec.js']);
In your tests:
1describe('tests with webdriver', function() { 2 it('will wait until webdriver is done', function() { 3 // This will be an asynchronous test. It will finish once webdriver has 4 // loaded the page, found the element, and gotten its text. 5 driver.get('http://www.example.com'); 6 7 var myElement = driver.findElement(webdriver.By.id('hello')); 8 9 // Here, expect understands that myElement.getText() is a promise, 10 // and resolves it before asserting. 11 expect(myElement.getText()).toEqual('hello world'); 12 }); 13})
TypeScript
For the typings related to the changes in the global jasmine variables (e.g.
allowing it()
blocks to return a promise), we publish the package
@types/jasminewd2
. If you are writing tests using jasminewd (including
Protractor tests), be sure to include @types/jasminewd2
in your
devDependencies
, as these global type modifications are not bundled with
the jasminewd2
npm module.
jasminewd also exports one function directly: init
. Unfortunately, we do not
publish typings for this function. If you call this function directly (e.g. you
are a Protractor dev), you should simply do:
1require('jasminewd2').init(controlFlow, webdriver);
async
functions / await
async
functions and the await
keyword are likely coming in ES2017 (ES8), and
available via several compilers. At the moment, they often break the WebDriver
control flow.
(GitHub issue). You can
still use them, but if you do then you will have to use await
/Promises for
almost all your synchronization. See spec/asyncAwaitAdapterSpec.ts
and
spec/asyncAwaitErrorSpec.ts
for examples.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
security policy file detected
Details
- Info: security policy file detected: github.com/angular/.github/SECURITY.md:1
- Info: Found linked content: github.com/angular/.github/SECURITY.md:1
- Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/angular/.github/SECURITY.md:1
- Info: Found text in security policy: github.com/angular/.github/SECURITY.md:1
Reason
Found 9/30 approved changesets -- score normalized to 3
Reason
branch protection is not maximal on development and all release branches
Details
- Info: 'allow deletion' disabled on branch 'jasminewd2'
- Info: 'force pushes' disabled on branch 'jasminewd2'
- Warn: 'branch protection settings apply to administrators' is disabled on branch 'jasminewd2'
- Warn: branch 'jasminewd2' does not require approvers
- Warn: codeowners review is not required on branch 'jasminewd2'
- Warn: no status checks found to merge onto branch 'jasminewd2'
- Warn: PRs are not required to make changes on branch 'jasminewd2'; or we don't have data to detect it.If you think it might be the latter, make sure to run Scorecard with a PAT or use Repo Rules (that are always public) instead of Branch Protection settings
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 17 are checked with a SAST tool
Score
4.7
/10
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn MoreOther packages similar to blocking-proxy
workerpool
Offload tasks to a pool of workers on node.js and in the browser
set-blocking
set blocking stdio and stderr ensuring that terminal output does not truncate
http-proxy-agent
An HTTP(s) proxy `http.Agent` implementation for HTTP
agent-base
Turn a function into an `http.Agent` instance