Skip to content

Commit

Permalink
add test for global upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
voxsim committed Apr 23, 2017
1 parent 2fff381 commit d0bddc6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions __tests__/commands/global.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,15 @@ test.concurrent('ls', async (): Promise<void> => {
});
});
});

test.concurrent('upgrade', async (): Promise<void> => {
const tmpGlobalFolder = await createTempGlobalFolder();
return runGlobal(['add', '[email protected]'], {globalFolder: tmpGlobalFolder}, 'add-with-prefix-flag', () => {})
.then(() => {
return runGlobal(['upgrade', 'react-native-cli'], {globalFolder: tmpGlobalFolder}, 'add-with-prefix-flag',
(config, reporter, install, getStdout) => {
expect(getStdout()).toContain('react-native-cli');
expect(getStdout()).not.toContain('[email protected]');
});
});
});
Binary file not shown.

0 comments on commit d0bddc6

Please sign in to comment.