Skip to content

Commit

Permalink
tmp(): add a randomly thrown error
Browse files Browse the repository at this point in the history
  • Loading branch information
rwaskiewicz committed Jun 30, 2023
1 parent e4f1db9 commit d7cb522
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ export function sass(opts: d.PluginOptions = {}): d.Plugin {
* @returns the results of the Sass file compilation
*/
transform(sourceText: string, fileName: string, context: d.PluginCtx): Promise<d.PluginTransformResults> {
if (Math.random() > 0.5) {
throw new Error('RANDOM CHAOS!');
}
if (!usePlugin(fileName)) {
return null;
}
Expand Down

0 comments on commit d7cb522

Please sign in to comment.