Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
API testing made simple
npm install api-test --save
WORKING IN PROGRESS
Create a test file 'test/api-test/sample.md' to test the 'item/get' endpoint, like this:
# item/get
## DB
### item in items
name: 'Salad'
price: 500
## Invalid request
### Post
randomId()
### Out
error:
code: 200
## Valid request
### Post
item.id
### Out
name: item.name
price: item.price
And in your mocha testing code:
require('api-test')('test/api-test', {
mongoUri: 'mongodb://localhost:27017/api_test',
baseUrl: 'http://localhost:8000/'
})
Testing is, at the same time:
This module tries to solve this by making testing code more concise and unifying testing and documentation.
Markdown was choosen because it's easy to write/read and it's not code!
A test is divided in two parts:
This is an optional section called 'DB' that let you insert documents and clear mongo collections to prepare the database before the test cases run.
The syntax is simply:
### _docName_ in _collection_
_docDescription_
At the first insertion in a collection, it will be cleared. This is important to make every test isolated. You may refer to this object by its docName.
The syntax for docDescription is described at ## object syntax
The syntax is simply:
### Clear _collection_
Use this only when you won't insert any document in that collection, but want it to be cleared.
All documents in that collection will be removed, indexes will be kept
A test case has three sections:
Post
: the JSON body to send by POST. Must start with a header like ### Post
Out
: the expected JSON output. Must start with a header like ### Out
Finds
: optional DB assertions. Must start with a header like ### Find in _collection_
In all cases, the syntax is described at ## object syntax
FAQs
API testing made simple
The npm package api-test receives a total of 0 weekly downloads. As such, api-test popularity was classified as not popular.
We found that api-test demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers 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
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.