@@ -7,19 +7,19 @@ import FilePatchController from '../../lib/controllers/file-patch-controller';
77import Hunk from '../../lib/models/hunk' ;
88import HunkLine from '../../lib/models/hunk-line' ;
99
10- describe ( 'FilePatchController' , ( ) => {
10+ describe ( 'FilePatchController' , function ( ) {
1111 let atomEnv , commandRegistry ;
1212
13- beforeEach ( ( ) => {
13+ beforeEach ( function ( ) {
1414 atomEnv = global . buildAtomEnvironment ( ) ;
1515 commandRegistry = atomEnv . commands ;
1616 } ) ;
1717
18- afterEach ( ( ) => {
18+ afterEach ( function ( ) {
1919 atomEnv . destroy ( ) ;
2020 } ) ;
2121
22- it ( 'bases its tab title on the staging status' , ( ) => {
22+ it ( 'bases its tab title on the staging status' , function ( ) {
2323 const filePatch1 = new FilePatch ( 'a.txt' , 'a.txt' , 'modified' , [ new Hunk ( 1 , 1 , 1 , 3 , [ ] ) ] ) ;
2424 const controller = new FilePatchController ( { commandRegistry, filePatch : filePatch1 , stagingStatus : 'unstaged' } ) ;
2525 assert . equal ( controller . getTitle ( ) , 'Unstaged Changes: a.txt' ) ;
@@ -32,7 +32,7 @@ describe('FilePatchController', () => {
3232 assert . deepEqual ( changeHandler . args , [ [ controller . getTitle ( ) ] ] ) ;
3333 } ) ;
3434
35- it ( 'renders FilePatchView only if FilePatch has hunks' , async ( ) => {
35+ it ( 'renders FilePatchView only if FilePatch has hunks' , async function ( ) {
3636 const emptyFilePatch = new FilePatch ( 'a.txt' , 'a.txt' , 'modified' , [ ] ) ;
3737 const controller = new FilePatchController ( { commandRegistry, filePatch : emptyFilePatch } ) ; // eslint-disable-line no-new
3838 assert . isUndefined ( controller . refs . filePatchView ) ;
@@ -43,7 +43,7 @@ describe('FilePatchController', () => {
4343 assert . isDefined ( controller . refs . filePatchView ) ;
4444 } ) ;
4545
46- it ( 'updates when a new FilePatch is passed' , async ( ) => {
46+ it ( 'updates when a new FilePatch is passed' , async function ( ) {
4747 const hunk1 = new Hunk ( 5 , 5 , 2 , 1 , [ new HunkLine ( 'line-1' , 'added' , - 1 , 5 ) ] ) ;
4848 const hunk2 = new Hunk ( 8 , 8 , 1 , 1 , [ new HunkLine ( 'line-5' , 'deleted' , 8 , - 1 ) ] ) ;
4949 const hunkViewsByHunk = new Map ( ) ;
@@ -60,7 +60,7 @@ describe('FilePatchController', () => {
6060 assert ( hunkViewsByHunk . get ( hunk3 ) != null ) ;
6161 } ) ;
6262
63- it ( 'invokes a didSurfaceFile callback with the current file path' , ( ) => {
63+ it ( 'invokes a didSurfaceFile callback with the current file path' , function ( ) {
6464 const filePatch1 = new FilePatch ( 'a.txt' , 'a.txt' , 'modified' , [ new Hunk ( 1 , 1 , 1 , 3 , [ ] ) ] ) ;
6565 const didSurfaceFile = sinon . spy ( ) ;
6666 const controller = new FilePatchController ( { commandRegistry, filePatch : filePatch1 , stagingStatus : 'unstaged' , didSurfaceFile} ) ;
@@ -69,8 +69,8 @@ describe('FilePatchController', () => {
6969 assert . isTrue ( didSurfaceFile . calledWith ( 'a.txt' , 'unstaged' ) ) ;
7070 } ) ;
7171
72- describe ( 'integration tests' , ( ) => {
73- it ( 'stages and unstages hunks when the stage button is clicked on hunk views with no individual lines selected' , async ( ) => {
72+ describe ( 'integration tests' , function ( ) {
73+ it ( 'stages and unstages hunks when the stage button is clicked on hunk views with no individual lines selected' , async function ( ) {
7474 const workdirPath = await cloneRepository ( 'multi-line-file' ) ;
7575 const repository = await buildRepository ( workdirPath ) ;
7676 const filePath = path . join ( workdirPath , 'sample.js' ) ;
@@ -108,7 +108,7 @@ describe('FilePatchController', () => {
108108 assert . autocrlfEqual ( await repository . readFileFromIndex ( 'sample.js' ) , originalLines . join ( '\n' ) ) ;
109109 } ) ;
110110
111- it ( 'stages and unstages individual lines when the stage button is clicked on a hunk with selected lines' , async ( ) => {
111+ it ( 'stages and unstages individual lines when the stage button is clicked on a hunk with selected lines' , async function ( ) {
112112 const workdirPath = await cloneRepository ( 'multi-line-file' ) ;
113113 const repository = await buildRepository ( workdirPath ) ;
114114 const filePath = path . join ( workdirPath , 'sample.js' ) ;
@@ -189,8 +189,8 @@ describe('FilePatchController', () => {
189189 } ) ;
190190
191191 // https://github.com/atom/github/issues/341
192- describe ( 'when duplicate staging occurs' , ( ) => {
193- it ( 'avoids patch conflicts with pending line staging operations' , async ( ) => {
192+ describe ( 'when duplicate staging occurs' , function ( ) {
193+ it ( 'avoids patch conflicts with pending line staging operations' , async function ( ) {
194194 const workdirPath = await cloneRepository ( 'multi-line-file' ) ;
195195 const repository = await buildRepository ( workdirPath ) ;
196196 const filePath = path . join ( workdirPath , 'sample.js' ) ;
@@ -255,7 +255,7 @@ describe('FilePatchController', () => {
255255 assert . autocrlfEqual ( actualLines , expectedLines . join ( '\n' ) ) ;
256256 } ) ;
257257
258- it ( 'avoids patch conflicts with pending hunk staging operations' , async ( ) => {
258+ it ( 'avoids patch conflicts with pending hunk staging operations' , async function ( ) {
259259 const workdirPath = await cloneRepository ( 'multi-line-file' ) ;
260260 const repository = await buildRepository ( workdirPath ) ;
261261 const filePath = path . join ( workdirPath , 'sample.js' ) ;
0 commit comments