Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
gas-mock-globals
Advanced tools
This library is dedicated to mock the google apps script services
It accumulates data which can be useful for writing tests and debugging the codebase.
npm install --save-dev gas-mock-globals
import { Card } from 'gas-mock-globals'
or in Common.js
const Card = require('gas-mock-globals')
import { Card } from 'gas-mock-globals'
import GenericView from 'src/views/Generic'
import data from '../helpers/mocks/responses/getData.json'
describe('Generic View', () => {
it('Runs the render method and checks the returned data is a card instance', () => {
const card = new GenericView({ data }).render()
expect(card).toBeInstanceOf(Card)
expect(card.printJson()).toMatchSnapshot()
})
})
As you can see using mock services is super easy and straightforward. All you have to do is import the specific class to your test file.
In our expample we use mock API response to use that data in GenericView
constructor call.
Also, we check if the JSON representation of the view corresponds the snapshot.
npm test
npm version
npm publish --access public
NOTE that to contribute you should make sure that:
npm test
FAQs
A library that mocks Google Apps Script Services
The npm package gas-mock-globals receives a total of 58 weekly downloads. As such, gas-mock-globals popularity was classified as not popular.
We found that gas-mock-globals demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.