mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-11 22:17:14 +03:00
add new CWS user parsing method
This commit is contained in:
@@ -2,6 +2,7 @@ import axios from "axios";
|
||||
import assert from "assert";
|
||||
import { config } from "../../src/config";
|
||||
import { getHash } from "../../src/utils/getHash";
|
||||
import { client } from "../utils/httpClient";
|
||||
|
||||
describe("userCounter", () => {
|
||||
it("Should return 200", function (done) {
|
||||
@@ -20,4 +21,13 @@ describe("userCounter", () => {
|
||||
})
|
||||
.catch(err => done(err));
|
||||
});
|
||||
it("Should not incremeent counter on OPTIONS", function (done) {
|
||||
/* cannot spy test */
|
||||
if (!config.userCounterURL) this.skip(); // skip if no userCounterURL is set
|
||||
//const spy = sinon.spy(UserCounter);
|
||||
client({ method: "OPTIONS", url: "/api/status" })
|
||||
.then(() => client({ method: "GET", url: "/api/status" }));
|
||||
//assert.strictEqual(spy.callCount, 1);
|
||||
done();
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user