fix(fs): rewrite test to avoid side effect