Snapshot hot swapping
Cryrivers opened this issue · comments
Zhongliang Wang commented
Purposed Syntax, not finalized yet.
import ms from '@manta-style/test-helper';
describe('test', () => {
beforeAll(async () => {
await ms.setup('path/to/configFile.ts');
});
afterAll(async () => {
await ms.teardown();
});
test('some test', async () => {
await ms.loadSnapshot('path/to/successSnapshot.json');
// Test cases for success response...
await ms.loadSnapshot('path/to/failureSnapshot.json');
// Test cases for failure response...
});
});