jest-golden-master
helps writing tests as per the Golden Master refactoring method ⚙️ 🧰 🔧
jest-golden-master
monckey-patches the native console.log
method 🙉 🙈
npm install -D jest-golden-master
jest-golden-master
exports a single runGoldenMaster
function to be used within a test. This way, the library seamlessly integrates with Jest 🫶 💙
import runGoldenMaster from "jest-golden-master";
test("Test name", async () => {
await runGoldenMaster(async () => {
// Write your scenario here
// Meaning: invoke the legacy codebase's API
// All `console.log`s will be logged as per the Golden Master standards
});
});