pkg-fetch/test/log-mock.js
Andrew Lisowski f7a75173f9
Run prettier, convert to standard eslint, add CI (#138)
* Run prettier and convert to standard eslint

* Add CI, fix broken test

* Update package.json

Co-authored-by: Lee Robinson <me@leerob.io>

* switch to single quote

* remove tests for now

Co-authored-by: Lee Robinson <me@leerob.io>
2021-03-26 16:51:31 -07:00

27 lines
390 B
JavaScript

class LogMock {
constructor(actions) {
this.actions = actions;
}
info(text) {
this.actions.push(`> ${text}`);
}
warn(text) {
this.actions.push(`> WARN ${text}`);
}
error(text) {
if (text.message) text = text.message;
this.actions.push(`> ERR! ${text}`);
}
enableProgress() {}
showProgress() {}
disableProgress() {}
}
export default LogMock;