Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up the behavior tests #5365

Merged
merged 29 commits into from
Oct 10, 2018
Merged

Clean up the behavior tests #5365

merged 29 commits into from
Oct 10, 2018

Conversation

Timer
Copy link
Contributor

@Timer Timer commented Oct 9, 2018

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();
});

@Timer Timer added this to the 2.0.x milestone Oct 9, 2018
@Timer Timer self-assigned this Oct 9, 2018
@Timer Timer requested a review from gaearon October 9, 2018 07:20
@Timer Timer merged commit 5fecfee into facebook:master Oct 10, 2018
@Timer Timer deleted the enhance-testing branch October 10, 2018 15:05
@lock lock bot locked and limited conversation to collaborators Jan 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants