@react-ddd/cli
Advanced tools
@@ -24,3 +24,3 @@ import React from 'react'; | ||
| function component_renders(this: Context) { | ||
| render(() => <{{name}} />); | ||
| render(<{{name}} />); | ||
| } | ||
@@ -27,0 +27,0 @@ |
| import test from 'jest-gwt'; | ||
| import { render } from '@testing-library/react-hooks'; | ||
| import '@testing-library/jest-dom'; | ||
| import type { RenderHookResult } from '@testing-library/react'; | ||
| import { renderHook } from '@testing-library/react'; | ||
| import use{{name.pascal}} from './{{name.pascal}}'; | ||
| import type { {{name.pascal}} } from './use{{name.pascal}}'; | ||
| import use{{name.pascal}} from './use{{name.pascal}}'; | ||
| describe('hooks > {{name}}', () => { | ||
| describe('hooks > use{{name.pascal}}', () => { | ||
| test('renders', { | ||
@@ -20,9 +20,11 @@ given: {}, | ||
| type Context = { | ||
| result: {{name.pascal}}, | ||
| hook: RenderHookResult<{{name.pascal}}, never>['result'], | ||
| }; | ||
| function using_hook(this: Context) { | ||
| const { result } = render(() => { | ||
| use{{name.pascal}}(); | ||
| }); | ||
| const { result } = renderHook(() => ( | ||
| use{{name.pascal}}() | ||
| )); | ||
| this.hook = result; | ||
| } |
+2
-2
| { | ||
| "name": "@react-ddd/cli", | ||
| "version": "0.0.5", | ||
| "version": "0.0.7", | ||
| "description": "Code generation", | ||
@@ -114,2 +114,2 @@ "main": "dist/index.js", | ||
| } | ||
| } | ||
| } |
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
59018
0.15%