Not sure about the quality of the masks or how you could test the quality.
A basic tests one can do at home to see if a mask passes the minimum quality:
For the three-layered surgical type masks:
In a relatively clean working area, carefully cut open and separate the layers/sheets of the mask
Layer 1 (outer layer) usually blue, is water droplet resistant. Hold it in a form of a cup/spoon, put like a teaspoon of water in it.
No leak = pass
Leak = fail
Layer 2 (middle layer) the important layer, is white. Look carefully at it (use magnifying glass if you like) and you shouldn't see any obvious holes/bubbles on it.
This layer should also be holding a bit of static. Static layer theoretically will hold particles onto itself instead of letting them passing thru.
No visible holes & retaining static = pass
Visible holes = fail
No static = fail
Layer 3 (inner layer, the layer that touches your face) is a bit absorbent, as in it'll absorb some moisture from your breathe.
Comfy & keeps other layers of mask from getting wet = pass
Just a test one can do at home without professional tools. It just shows if each layer is doing minimally what it is suppose to do.
edit: found a youtube video of similar tests