Zum Hauptinhalt springen
Echtzeit-Radar & Feeds
Alle RSS Feeds ➔
👥 Community & Social
IT Security NachrichtenOnePlus/OxygenOS: Schad-App erhält Root-Zugriff ohne Berechtigungen(24.09.2026 um 23:38 Uhr)
•
IT Security NachrichtenRyuk Member Karen Vardanyan Sentenced to Two Years in U.S. Prison(24.09.2026 um 22:50 Uhr)
•••••
Hacking & PentestingRyuk Member Karen Vardanyan Sentenced to Two Years in U.S. Prison(24.09.2026 um 22:50 Uhr)
•
AI & KI NachrichtenWhy the U.N. Still Matters(24.09.2026 um 23:00 Uhr)
•••
IT Security NachrichtenOnePlus/OxygenOS: Schad-App erhält Root-Zugriff ohne Berechtigungen(24.09.2026 um 23:38 Uhr)
•
IT Security NachrichtenRyuk Member Karen Vardanyan Sentenced to Two Years in U.S. Prison(24.09.2026 um 22:50 Uhr)
•••••
Hacking & PentestingRyuk Member Karen Vardanyan Sentenced to Two Years in U.S. Prison(24.09.2026 um 22:50 Uhr)
•
AI & KI NachrichtenWhy the U.N. Still Matters(24.09.2026 um 23:00 Uhr)
•••
Intelligence View
⚡ tsecurity.de Intelligence

Setup Jest (Ts) for a brand new React project

Alright, first things first — this post is for me. I’m just promoting a note from my Notion to a post. Maybe someone finds it useful, who knows 🤷‍♂️. But don’t get me wrong, the real reason is just to have it handy in case I can’t log in…

0
↗ Quelle (dev.to)
Reagiere als Erste:r — dein Feedback zählt!

Alright, first things first — this post is for me. I’m just promoting a note from my Notion to a post.

Maybe someone finds it useful, who knows 🤷‍♂️.



But don’t get me wrong, the real reason is just to have it handy in case I can’t log into my Notion account.





Context: I'm preparing the resources for my next React course and we're to talk about unit testing (Jest).



We have already npm create vite@latest, and created the well-known <Button />



We want this to work: button.test.tsx




import { render, screen } from "@testing-library/react";
import { Button } from "./button";

describe("<Button />", () => {
it("renders: match snapshot", () => {
render(<Button onClick={jest.fn()} />);
const button = screen.getByRole("button");
expect(button).toMatchSnapshot();
});
});









STEPS






npm i --save-dev jest
npm init jest@latest






jest-init






Dependencies (ts)






npm i -D @types/jest
npm i -D @testing-library/react
npm i -D ts-jest
npm i -D jest-environment-jsdom
npm i -D jest-transform-stub






jest.config.mjs




/**
* For a detailed explanation regarding each configuration property, visit:
* https://jestjs.io/docs/configuration
*/


/** @type {import('jest').Config} */
const config = {
clearMocks: true,
collectCoverage: true,
collectCoverageFrom: ["src/**"],
coverageDirectory: "coverage",
coverageProvider: "v8",
moduleDirectories: ["node_modules", "src"], // @see https://stackoverflow.com/a/51174924/1614677
preset: "ts-jest",
resetMocks: true,
restoreMocks: true,
roots: ["<rootDir>/src"],
testEnvironment: "jsdom",
testMatch: ["**/?(*.)+(spec|test).[tj]s?(x)"],
transform: {
"^.+\\.(js|ts|tsx)$": "ts-jest",
"^.+.(css|styl|less|sass|scss|png|jpg|ttf|woff|woff2)$":
"jest-transform-stub",
},
};

export default config;









Won't work cause of the default tsconfig (2x tsconfigs by default)... this is my tsconfig.json




{
"compilerOptions": {
/* type checking */
"strict": true, // turn on strict mode family
"noFallthroughCasesInSwitch": true, // every switch case should break or return
/* modules */
"baseUrl": "src", // base path for imports
"module": "ESNext", // ESModules & allows «import.meta»
"moduleResolution": "Node", // recommended: ts mimic node resolution
"resolveJsonModule": true, // allows .json files
/* language */
"target": "ES2016",
"jsx": "react-jsx",
"lib": [
"DOM",
"DOM.Iterable",
"ESNext"
],
/* js support */
"allowJs": true, // allows .js files
/* Interop Constraints */
"esModuleInterop": true, // recommended: compatibility with libraries using CommonJS
"allowSyntheticDefaultImports": true, // allows «import Foo from 'foo'»
"forceConsistentCasingInFileNames": true, // checks for case sensitivity file names
"isolatedModules": true, // force all files to import/export (no global scripts)
/* completeness */
"skipLibCheck": true, // skip checking node_modules/*.d.ts files
/* emit */
"noEmit": true // checks for errors only
},
"include": [
"src"
]
}






==> output




 PASS  src/components/button.test.tsx
<Button />
✓ renders: match snapshot (35 ms)

› 1 snapshot written.






--

nice.

SOC Incident Playbook: Remote Code Execution (RCE) Defense
Syntax validiert (0 Fehler)
title: Detect Exploitation - Setup Jest (Ts) for a brand new React project
id: 0cd2eebb-737b-427c-8122-1edd2270b78d
status: experimental
description: Automatisch generierte SIEM-Erkennungsregel basierend auf CTI Intelligence
references:
  - https://tsecurity.de/
author: iShareStuff CTI Automated Detection Engine
date: 2026-09-24
logsource:
  category: network_connection
  product: any
detection:
  selection:
      CommandLine|contains:
        - 'exploit'
  condition: selection
falsepositives:
  - Legitime administrative Zugriffe oder Penetrationstests
level: high
tags:
  - attack.initial_access
Syntax validiert (0 Fehler)
rule CTI_Threat_Indicator {
    meta:
        author = "iShareStuff CTI Automated Detection Engine"
        date = "2026-09-24"
        description = "YARA Signature for "
    strings:
        $str = "Setup Jest (Ts) for a brand ne" ascii wide
    condition:
        any of them
}
Syntax validiert (0 Fehler)
index=security sourcetype IN ("cisco:asa", "pan:traffic", "zeek_conn", "suricata", "WinEventLog:Security")
("Setup Jest Ts for a brand new React proj")
| stats count earliest(_time) as first_seen latest(_time) as last_seen by src_ip, dest_ip, dest_host, signature
| eval first_seen=strftime(first_seen, "%Y-%m-%d %H:%M:%S"), last_seen=strftime(last_seen, "%Y-%m-%d %H:%M:%S")
| sort - count
Syntax validiert (0 Fehler)
message: "*Setup Jest Ts for a brand new React proj*"
Syntax validiert (0 Fehler)
CommonSecurityLog
| where Message has "Setup Jest Ts for a brand new React proj"
| summarize EventCount = count(), FirstSeen = min(TimeGenerated), LastSeen = max(TimeGenerated) by SourceIP, DestinationIP, DestinationPort, Activity
| extend DetectionRule = "iShareStuff-CTI-Compiled"
| sort by EventCount desc
🎯
MITRE ATT&CK Matrix Navigator 14 Taktiken
Reconnaissance
-
Resource Development
-
Initial Access
Execution
Persistence
-
Privilege Escalation
Defense Evasion
Credential Access
-
Discovery
-
Lateral Movement
-
Collection
-
Command and Control
Exfiltration
-
Impact
tsecurity.de Cognitive Threat RAG
Fokus-Vektor:

Kognitive Analyse für identifizierte Bedrohung: Erhöhte Bedrohungslage im Bereich Setup Jest (Ts) for a brand new React pr.... Basierend auf 368k Vektor-Korrelationen werden sofortige Isolationsmaßnahmen für betroffene Endpunkte empfohlen.

🛡️ Angriffsfläche & Exposure

Netzwerk/Remote-Zugriff ohne Vorauthentifizierung möglich.

⚡ Empfohlene Sofortmaßnahmen
  • 1. Perimeter-Inspektion: Relevante Portfreigaben und exponierte Endpunkte unverzüglich scannen.
  • 2. Patch-Applikation: Hersteller-Hotfix einspielen oder betroffene Daemons in isolierte DMZ-Segmente überführen.
  • 3. Telemetrie & EDR-Alerts: Prozessaufrufe und Child-Processes auf anomale Shell-Spawns überwachen.
🔗 Semantisch verwandte Zero-Days MariaDB 11.7 VEC
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Setup Jest (Ts) for a brand new React project

Thematisch verwandte Begriffe: Setup, Jest, brand, React · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-81473 | Dell Rugged Control Center (RCC), versions prior to 5.2.206, contain an …
Advisory →
tsecurity.de Icon
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag
Themen-Radar & Intelligence Matrix
Echtzeit-Taxonomie nach Angriffsvektoren & Plattformen

tsecurity.de Live Threat Radar

🔴 LIVE RADAR
MONITORING
AKTIV
CVE-DATENBANK
LIVE
🔍
Community Radar & Live Chat
Sentinel Bot online • Live-Stream
Dein Cluster: Security Explorer
Match:
lädt…
Verbindung zum Community-Stream wird aufgebaut...
Bearbeitungsmodus — Senden überschreibt deine Nachricht
Community-Puls — was gerade passiert
lädt…
Aktivitäten deiner Analysten
lädt…
Neues Thema oder Eilmeldung einreichen

Reiche interessante Links, Zero-Days oder Debatten ein. Die Community entscheidet per Upvote über die Veröffentlichung.

Heiß diskutierte Einreichungen
📂 Keine gespeicherten Artikel vorhanden.
Zurück Ziehen Vor
Links: vorheriger Artikel • Rechts: nächster Artikel • unten: schließen
News NIS-2 Frühwarnung Tier-1 Intel TTP ⏱️ 3 Min vor 10 Min
Artikeldaten werden geladen...
↗ Original-Quelle