Created Woodpecker CI/CD deployment
- Created Dockerfile for packing up API and Web projects as Docker image
This commit is contained in:
30
Web/src/tests/utils/arrayHelper.test.js
Normal file
30
Web/src/tests/utils/arrayHelper.test.js
Normal file
@ -0,0 +1,30 @@
|
||||
import { isSubset } from "../../utils/arrayHelper";
|
||||
|
||||
describe("utils/arrayHelper", () => {
|
||||
describe("isSubset", () => {
|
||||
const testCases = [
|
||||
{
|
||||
parentArray: ["test1", "test2", "test3", "test4"],
|
||||
subsetArray: ["test1"],
|
||||
expected: true
|
||||
},
|
||||
{
|
||||
parentArray: ["test1", "test2", "test3", "test4"],
|
||||
subsetArray: ["test5"],
|
||||
expected: false
|
||||
},
|
||||
{
|
||||
parentArray: ["test1", "test2", "test3", "test4"],
|
||||
subsetArray: ["test2", "test4"],
|
||||
expected: true
|
||||
}
|
||||
];
|
||||
|
||||
testCases.forEach(test => {
|
||||
it(`[${test.subsetArray.join(", ")}] should be a subset of [${test.parentArray.join(", ")}] which is ${test.expected}`, () => {
|
||||
const actual = isSubset(test.parentArray, test.subsetArray);
|
||||
expect(actual).toEqual(test.expected);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user