mirror of
https://github.com/atom/atom.git
synced 2026-01-24 14:28:14 -05:00
Don't use require.resolve.
This commit is contained in:
@@ -270,8 +270,12 @@ describe('GitRepositoryAsync', () => {
|
||||
})
|
||||
|
||||
describe('.destroy()', () => {
|
||||
beforeEach(() => {
|
||||
const workingDirectory = copyRepository()
|
||||
repo = GitRepositoryAsync.open(workingDirectory)
|
||||
})
|
||||
|
||||
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 error = null
|
||||
@@ -280,7 +284,10 @@ describe('GitRepositoryAsync', () => {
|
||||
} catch (e) {
|
||||
error = e
|
||||
}
|
||||
|
||||
expect(error.name).toBe(GitRepositoryAsync.DestroyedErrorName)
|
||||
|
||||
repo = null
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user