mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-11-10 10:17:11 +03:00
Don't use require.resolve.
This commit is contained in:
parent
a7d46e4435
commit
bd8b26ab46
@ -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
|
||||
})
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user