Created by: Timer
This cleans up the behavior tests because they were hastily added for the v2 release. The tests themselves were revised for clarity.
More work needs to be done documenting how to use and write them, but this is a start.
Example new test:
test('builds in development', async () => {
const { fulfilled } = await testSetup.scripts.start({ smoke: true });
expect(fulfilled).toBe(true);
});
test('builds in production', async () => {
const { fulfilled } = await testSetup.scripts.build();
expect(fulfilled).toBe(true);
});
test('formats babel syntax error', async () => {
fs.copySync(
path.join(__dirname, 'src', 'AppBabel.js'),
path.join(testSetup.testDirectory, 'src', 'App.js')
);
const { stdout, stderr } = await testSetup.scripts.build();
expect({ stdout, stderr }).toMatchSnapshot();
});