creating tests and decoupling with node's fs