This repo is intended to be used to reproduce errors when writing deck plugins.
- EcmaScript module packaging ✅ (
⚠️ workaround)- When upgrading
@spinnaker/*@ >= 0.0.595the packaging changed from CommonJS to EcmaScript. Causing Jest to no longer be able to resolve the@spinnaker/*dependencies. - The workaround for this is to no longer use Jest, but to pull in Karma + Jasmine
- This workaround is not ideal as it changes how we do work, but it allows us to continue testing.
- When upgrading
- Circular dependency
- Webpack 5 identifies and breaks on circular dependencies.
@spinnakerdepends onreact-virtualizedwhich after an update to better use types introduced a lot of circular dependencies. See react-virtualized#1308 and react-virtualized#1494- The version that introduced the issue is significantly older than the requested version.
- spinnaker/deck uses Webpack 4 so they are not seeing this issue. Which says the workaround is to rollback to Webpack 4
- Karma configuration is in
karma.conf.js - Webpack config is located in
webpack.config.test.js - Webpack context is constructed out of
karma-shim.js
| Step | Description | Command |
|---|---|---|
| 1 | Clone repo | git clone https://github.com/abannachZen/test-deck-plugin.git |
| 2 | Install dependencies | yarn |
| 3 | Run tests | yarn test |