Skip to content

Instantly share code, notes, and snippets.

@zzarcon
Last active November 5, 2017 05:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zzarcon/bc539dd0c34650e0e3c09bb3993d5462 to your computer and use it in GitHub Desktop.
Save zzarcon/bc539dd0c34650e0e3c09bb3993d5462 to your computer and use it in GitHub Desktop.
// Inline await to get the the user changed files
const filesToMatch = changedFiles ? await changedFiles() : files;
// Example of a test
test('should run command if glob files matches', async () => {
await modifyFixtures();
const {stdout} = await run(`'["__fixtures__/**"]' 'echo fixtures changed'`);
expect(stdout.trim()).toEqual('fixtures changed');
await restoreFixtures();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment