Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
@sonder/buzz.js
Advanced tools
Buzz.js is a simple tool to help you mock GraphQL responses in your components that use Apollo's useQuery
and useMutation
hooks.
Install buzz
$ yarn add -D @sonder/buzz.js
Update your jest configuration to add a setup file to setupFilesAfterEnv
// package.json
...
"jest": {
"setupFilesAfterEnv": [
"jest/buzz.js" // 👈 add this
]
}
Load your local schema file onto the spaceship:
// jest/buzz.js
import moment from "moment";
import { loadSchemaFile, resetMocks, setMocks } from "@sonder/buzz.js";
beforeAll(() => {
loadSchemaFile("./schema.graphql"); // Relative path from the root of your workspace
// Optional: Mock out nonstandard scalar types in your schema
setMocks({
RFC3339DateTime: () => moment().format(),
});
});
afterEach(() => {
resetMocks();
});
Use it in your tests! Buzz is compatible with any DOM mocking library, including Enzyme and React Testing Library.
FAQs
Tools for mocking graphql queries and fragments
The npm package @sonder/buzz.js receives a total of 0 weekly downloads. As such, @sonder/buzz.js popularity was classified as not popular.
We found that @sonder/buzz.js demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.