
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
Just a simple testing tool to test javascript functions in both the client and server environments without having to write code for each (in the cases where the code is not specific to a server or client need).
--browser boolean switch to launch a browser and run
client tests manuallyThis program works by convention.
Name your directory 'test', or pass your testing directory to --td. Then, place the following files in this directory:
test() defined. test()
should have no parameters, and should return boolean, or throw
an error. It can be defined as async. The result of test()
will show up in the final output table listing all tests, or, if
--browser was passed, it will show up in the menu.server(request,response) should be
defined, and should end with calling response.writeHead() and
response.end() with appropriate parameters.fetch('./_data.json')
from a client test.npm install -g sctester
Then run sctester with options, as shown in the exmples below.
Puppeteer is required, so the install may take quite awhile. If already installed and you're just updating, you may be able to get away with not installing it by creating an .npmrc file (no name, just the extension like .gitignore) and placing the following in it:
puppeteer_skip_chromium_download=true
But this may only work on the developer end. I haven't tested it as a user.
sctester --td ./somedirectory --otheroptions
--td. Defaults to './test'. The
directory containing the test functions.Assuming a directory set up as above (see 'test' directory of this project for an example), you would run code as follows:
scTester --td ./test --port 8083

Unfortunately, if you prefer your terminal as a panel to the right (like me), you'll have to expand it wide enough to ensure the table doesn't wrap.
scTester --td ./test --port 8083 --browser

You shouldn't need to open a browser and navigate, the browser pops up for you at the home page with the developer panel visible, although you will have to click on the console tab yourself.
Click on any link to run the test. The results will show in the console tab of the developer panel.
This project started with some server-side and puppeteer code and eventually started turning into a framework of sorts. I decided to make a library out of it.
If powershell is blocking you, remember to:
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted
FAQs
Javascript function testing for server and client.
We found that sctester demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.