"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "spec/git-repository-provider-spec.js" between
atom-1.42.0.tar.gz and atom-1.43.0.tar.gz

About: Atom is a modern, approachable, yet hackable text editor.

git-repository-provider-spec.js  (atom-1.42.0):git-repository-provider-spec.js  (atom-1.43.0)
skipping to change at line 100 skipping to change at line 100
); );
const directory = new Directory(workDirPath); const directory = new Directory(workDirPath);
const result = await provider.repositoryForDirectory(directory); const result = await provider.repositoryForDirectory(directory);
expect(result).toBeInstanceOf(GitRepository); expect(result).toBeInstanceOf(GitRepository);
expect(provider.pathToRepository[result.getPath()]).toBeTruthy(); expect(provider.pathToRepository[result.getPath()]).toBeTruthy();
expect(result.getType()).toBe('git'); expect(result.getType()).toBe('git');
}); });
}); });
describe('when specified a Directory with a commondir file for a worktree',
() => {
it('returns a Promise that resolves to a GitRepository', async () => {
const directory = new Directory(
path.join(
__dirname,
'fixtures',
'git',
'master.git',
'worktrees',
'worktree-dir'
)
);
const result = await provider.repositoryForDirectory(directory);
expect(result).toBeInstanceOf(GitRepository);
expect(provider.pathToRepository[result.getPath()]).toBeTruthy();
expect(result.getType()).toBe('git');
});
});
describe('when specified a Directory without exists()', () => { describe('when specified a Directory without exists()', () => {
let directory; let directory;
beforeEach(() => { beforeEach(() => {
// An implementation of Directory that does not implement existsSync(). // An implementation of Directory that does not implement existsSync().
const subdirectory = {}; const subdirectory = {};
directory = { directory = {
getSubdirectory() {}, getSubdirectory() {},
isRoot() { isRoot() {
return true; return true;
skipping to change at line 196 skipping to change at line 215
); );
const directory = new Directory(workDirPath); const directory = new Directory(workDirPath);
const result = provider.repositoryForDirectorySync(directory); const result = provider.repositoryForDirectorySync(directory);
expect(result).toBeInstanceOf(GitRepository); expect(result).toBeInstanceOf(GitRepository);
expect(provider.pathToRepository[result.getPath()]).toBeTruthy(); expect(provider.pathToRepository[result.getPath()]).toBeTruthy();
expect(result.getType()).toBe('git'); expect(result.getType()).toBe('git');
}); });
}); });
describe('when specified a Directory with a commondir file for a worktree',
() => {
it('returns a Promise that resolves to a GitRepository', () => {
const directory = new Directory(
path.join(
__dirname,
'fixtures',
'git',
'master.git',
'worktrees',
'worktree-dir'
)
);
const result = provider.repositoryForDirectorySync(directory);
expect(result).toBeInstanceOf(GitRepository);
expect(provider.pathToRepository[result.getPath()]).toBeTruthy();
expect(result.getType()).toBe('git');
});
});
describe('when specified a Directory without existsSync()', () => { describe('when specified a Directory without existsSync()', () => {
let directory; let directory;
beforeEach(() => { beforeEach(() => {
// An implementation of Directory that does not implement existsSync(). // An implementation of Directory that does not implement existsSync().
const subdirectory = {}; const subdirectory = {};
directory = { directory = {
getSubdirectory() {}, getSubdirectory() {},
isRoot() { isRoot() {
return true; return true;
 End of changes. 2 change blocks. 
0 lines changed or deleted 40 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)