A simple (yet chaotic) component to introduce chaos in your Vue app.
Install
npm i vue-chaos
Import & use
<template>
<VueChaos
:chance="5"
error-message="My custom error message"
:run-in-production="false">
<MyOtherComponent />
</VueChaos>
</template>
<script>
import VueChaos from 'vue-chaos';
...
export default {
...
components:{
VueChaos
}
}
</script>
Name | Type | Default value | Description |
---|---|---|---|
chance |
Number |
5 |
Decides the probability of the wrapper to throw an error; |
error-message |
String |
🔥 Chaos emitted by VueChaos 🔥 |
custom error message to throw (i.e. to assert snapshots against) |
run-in-production |
Boolean |
false |
a flag to flip if we'd like to cause chaos in production (use at own risk! ☠️) |
"Chaos engineering is the discipline of experimenting on a software system in production in order to build confidence in the system's capability to withstand turbulent and unexpected conditions." (wiki)
Using the concept of ErrorCaptured
in combination with this component can and will improve your apps resilience;
This way you can make sure your app won't behave unexpectedly and will handle everything gracefully, so your customers won't be impacted.
- Frontend
- react-chaos
- Angular - no need as it's chaotic enough 😏🤭
- Other tools: