@gyugyu/sassunit

Unit testing framework for Dart Sass

Usage no npm install needed!

<script type="module">
  import gyugyuSassunit from 'https://cdn.skypack.dev/@gyugyu/sassunit';
</script>

README

sassunit

Unit testing framework for Dart Sass

Installation

npm install @gyugyu/sassunit @gyugyu/assert-sass sass

Example

@function sum($a, $b) {
  @return $a + $b;
}
@use 'functions';
@use '@gyugyu/assert-sass' as assert;

@function test-sum() {
  $ret: assert.equals(functions.sum(2, 3), 5);
  @return $ret;
}
npx sassunit

Watch mode

From v0.2.0, watch mode is added.

npx sassunit src --watch