added test that verified pb funbox check is working

This commit is contained in:
Miodec 2023-06-05 18:07:00 +02:00
parent 985ef5959e
commit 895c6738cb
2 changed files with 36 additions and 1 deletions

View file

@ -0,0 +1,35 @@
import _ from "lodash";
import * as pb from "../../src/utils/pb";
describe("Pb Utils", () => {
it("funboxCatGetPb", () => {
const testCases = [
{
funbox: "plus_one",
expected: true,
},
{
funbox: "none",
expected: true,
},
{
funbox: "nausea#plus_one",
expected: true,
},
{
funbox: "arrows",
expected: false,
},
];
_.each(testCases, (testCase) => {
const { funbox, expected } = testCase;
//@ts-ignore ignore because this expects a whole result object
const result = pb.canFunboxGetPb({
funbox,
});
expect(result).toBe(expected);
});
});
});

View file

@ -9,7 +9,7 @@ export default {
global: {
// These percentages should never decrease
statements: 40,
branches: 39,
branches: 38,
functions: 25,
lines: 43,
},