
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
type-safe-component-inputs
Advanced tools
Make your input signals type safe for testing
Angular currently lacks a robust and type-safe approach to set component input signals in test files. This package addresses that gap by providing a solution that enhances type safety and usability. Using the setComponentInputs
function, you can conveniently set your component's input signals while ensuring their types are correctly inferred.
npm install type-safe-component-inputs@latest
import { Component, input } from '@angular/core';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { setComponentInputs } from './your-utils-file';
@Component({
selector: 'app-test',
template: '{{ name() }} - {{ count() }}',
})
class TestComponent {
name = input.required<string>();
count = input.required<number>();
}
describe('TestComponent', () => {
let fixture: ComponentFixture<TestComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [TestComponent],
}).compileComponents();
fixture = TestBed.createComponent(TestComponent);
fixture.detectChanges();
});
it('should set inputs with correct types', () => {
setComponentInputs(fixture, { name: 'Test Name', count: 123 });
fixture.detectChanges();
expect(fixture.nativeElement.textContent).toContain('Test Name - 123');
});
});
This project is licensed under the MIT License - see the LICENSE file for details.
FAQs
Make your input signals type safe for testing
The npm package type-safe-component-inputs receives a total of 0 weekly downloads. As such, type-safe-component-inputs popularity was classified as not popular.
We found that type-safe-component-inputs demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.