Skip to content

gyugyu/sassunit

Repository files navigation

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