mirror of
https://github.com/atom/atom.git
synced 2026-01-24 22:38:20 -05:00
Test .destroy().
This commit is contained in:
@@ -238,6 +238,21 @@ describe('GitRepositoryAsync', () => {
|
||||
})
|
||||
})
|
||||
|
||||
describe('.destroy()', () => {
|
||||
it('throws an exception when any method is called after it is called', async () => {
|
||||
repo = new GitRepositoryAsync(require.resolve('./fixtures/git/master.git/HEAD'))
|
||||
repo.destroy()
|
||||
|
||||
let threw = false
|
||||
try {
|
||||
await repo.getShortHead()
|
||||
} catch (e) {
|
||||
threw = true
|
||||
}
|
||||
expect(threw).toBeTruthy()
|
||||
})
|
||||
})
|
||||
|
||||
describe('.getDirectoryStatus(path)', () => {
|
||||
let directoryPath, filePath
|
||||
|
||||
|
||||
Reference in New Issue
Block a user