@@ -768,19 +768,61 @@ describe('GithubPackage', function() {
768
768
await githubPackage . scheduleActiveContextUpdate ( ) ;
769
769
} ) ;
770
770
771
- it ( 'uses an active repository' , async function ( ) {
772
- await assert . async . isTrue ( githubPackage . getActiveRepository ( ) . isPresent ( ) ) ;
771
+ it ( 'uses a repository' , async function ( ) {
772
+ await assert . async . isOk ( githubPackage . getActiveRepository ( ) ) ;
773
773
} ) ;
774
774
} ) ;
775
775
} ) ;
776
776
777
- /*describe('when there is a change in the repository', function() {
777
+ describe ( 'when there is a change in the repository' , function ( ) {
778
+ let atomEnv , githubPackage ;
779
+ let workspace , project , commands , notificationManager ;
780
+ let tooltips , deserializers , config , keymaps , styles ;
781
+ let grammars , confirm , configDirPath , getLoadSettings ;
782
+ let renderFn , contextPool , currentWindow ;
783
+ let useLegacyPanels ;
784
+
785
+ // Build Atom Environment and create the GitHub Package
786
+ beforeEach ( async function ( ) {
787
+ atomEnv = global . buildAtomEnvironment ( ) ;
788
+ await disableFilesystemWatchers ( atomEnv ) ;
789
+
790
+ workspace = atomEnv . workspace ;
791
+ project = atomEnv . project ;
792
+ commands = atomEnv . commands ;
793
+ deserializers = atomEnv . deserializers ;
794
+ notificationManager = atomEnv . notifications ;
795
+ tooltips = atomEnv . tooltips ;
796
+ config = atomEnv . config ;
797
+ keymaps = atomEnv . keymaps ;
798
+ confirm = atomEnv . confirm . bind ( atomEnv ) ;
799
+ styles = atomEnv . styles ;
800
+ grammars = atomEnv . grammars ;
801
+ getLoadSettings = atomEnv . getLoadSettings . bind ( atomEnv ) ;
802
+ currentWindow = atomEnv . getCurrentWindow ( ) ;
803
+ configDirPath = path . join ( __dirname , 'fixtures' , 'atomenv-config' ) ;
804
+ renderFn = sinon . stub ( ) . callsFake ( ( component , element , callback ) => {
805
+ if ( callback ) {
806
+ process . nextTick ( callback ) ;
807
+ }
808
+ } ) ;
809
+
810
+ useLegacyPanels = ! workspace . getLeftDock ;
811
+
812
+ githubPackage = new GithubPackage ( {
813
+ workspace, project, commands, notificationManager, tooltips,
814
+ styles, grammars, keymaps, config, deserializers, confirm,
815
+ getLoadSettings, currentWindow, configDirPath, renderFn,
816
+ } ) ;
817
+
818
+ contextPool = githubPackage . getContextPool ( ) ;
819
+ } ) ;
820
+
778
821
let workdirPath1 , atomGitRepository1 , repository1 ;
779
822
let workdirPath2 , atomGitRepository2 , repository2 ;
780
823
824
+ // Setup file system.
781
825
beforeEach ( async function ( ) {
782
- this.retries(5); // FLAKE
783
-
784
826
[ workdirPath1 , workdirPath2 ] = await Promise . all ( [
785
827
cloneRepository ( 'three-files' ) ,
786
828
cloneRepository ( 'three-files' ) ,
0 commit comments