Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mattcheely/stencil-decorator-test-test
Example / check of decorator issues when testing StencilJS components
https://github.com/mattcheely/stencil-decorator-test-test
Last synced: 24 days ago
JSON representation
Example / check of decorator issues when testing StencilJS components
- Host: GitHub
- URL: https://github.com/mattcheely/stencil-decorator-test-test
- Owner: MattCheely
- License: mit
- Created: 2023-07-20T20:33:35.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-07-20T20:34:13.000Z (over 1 year ago)
- Last Synced: 2024-04-14T04:42:59.597Z (7 months ago)
- Language: TypeScript
- Size: 99.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# Broken Unit Tests With Decorator Example
This repo demonstrates a using a [basic TS decorator](src/utils/log-decorator.ts)
in [a component](src/components/my-component/my-component.tsx). In stencil v4
it's impossible to unit test this component, as Jest fails with an error:```
● Test suite failed to runReferenceError: _logResize_decorators is not defined
at src/components/my-component/my-component.tsx:145:25
at Object. (src/components/my-component/my-component.tsx:147:3)
at Object. (src/components/my-component/my-component.spec.ts:2:1)
```