import cssBlocks = require ( "@css-blocks/core" ) ; import { assert } from "chai" ; import { postcss } from "opticss" ; export function assertError ( errorType , message , promise ) { return promise . then ( ( ) => { assert ( false , `Error ${ errorType . name } was not raised.` ) ; } , ( reason ) => { assert ( reason instanceof errorType , reason . toString ( ) ) ; assert . deepEqual ( reason . message , message ) ; } ) ; }