Closed Rhymmor closed 6 years ago
Hmm, yes. CSS
is a browser-based method.
You could prevent this error by adding this code before your tests:
if (!CSS) {
CSS = {
supports: () => { return false }
}
}
Perhaps you will also have to use window
or global
, just to make explicit you wantCSS
globally assigned. (ex.: global.CSS = {...}
).
Getting error
ReferenceError: CSS is not defined
during the mocha tests I guess it is because this line: https://github.com/kazzkiq/CodeFlask/blob/e64a3082a3ce4ce8ad9db60ad9e600f3d2944a16/src/styles/editor.js#L4