Skip to content

Commit d7c76bd

Browse files
committed
Debug travis test issues
1 parent ed40e09 commit d7c76bd

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

test/test-test.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,26 @@ const doAssertions = () => {
1212
}
1313

1414
const restore = () => {
15-
global.fetch.restore()
15+
if (global.fetch.restore) {
16+
global.fetch.restore()
17+
}
1618
}
1719

1820
describe.only('Travis debug test', () => {
19-
describe('Working everywhere', () => {
21+
describe('Failing in Travis', () => {
2022
beforeEach(() => {
21-
expect(fetch).to.be.a('function')
22-
2323
stubFetch()
2424
})
2525

26-
afterEach(() => {
27-
global.fetch.restore()
28-
})
26+
afterEach(restore)
2927

3028
it('should show that fetch is stubbed', doAssertions)
3129
})
3230

33-
describe('Failing in Travis', () => {
31+
describe('Working everywhere', () => {
3432
beforeEach(() => {
33+
expect(fetch).to.be.a('function')
34+
3535
stubFetch()
3636
})
3737

0 commit comments

Comments
 (0)