Skip to content

Instantly share code, notes, and snippets.

@michan85
michan85 / sequelizeTest.js
Last active April 8, 2024 03:38
Automatic Transaction rollback for unit testing sequelize using jest
jest.mock("sequelize", () => {
const s = jest.requireActual("sequelize")
const cls = require('cls-hooked');
const namespace = cls.createNamespace('unit-test');
s.useCLS(namespace);
return s
})
@samtherussell
samtherussell / api_ref.txt
Last active October 24, 2024 10:48
Logitech SqueezeServer JSONRPC API
Squeezebox API
--------------
This document outlines the JSON RPC interface with a squeezeserver to control and obtain information about squeezeboxes.
JSON : JavaScript Object Notation
RPC : Remote Procedure Call
Uses POST requests sent to:
http://<squeezeserver_address>:9000/jsonrpc.js