Don't use require.resolve.

This commit is contained in:
joshaber 2016-01-12 10:19:55 -05:00
parent a7d46e4435
commit bd8b26ab46

View File

@ -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
})
})