Skip to content

docs(CONTRIBUTING): Remove traces of airplane mode#1367

Merged
gr2m merged 1 commit intobetafrom
bye-airplane
Jan 16, 2019
Merged

docs(CONTRIBUTING): Remove traces of airplane mode#1367
gr2m merged 1 commit intobetafrom
bye-airplane

Conversation

@paulmelnikow
Copy link
Copy Markdown
Member

Close #1077.

This comment doesn't make sense to me and I'm not clear what needs to happen with this code:

nock/tests/test_back.js

Lines 59 to 94 in 26954a7

// this is a temporary as we get rid of all the {skip: process.env.AIRPLANE}
// settings. When we are done with all, replace nockBackWithFixture and get
// rid of this function and the goodRequestLocalhost.json fixtures
function nockBackWithFixtureLocalhost(t, scopesLoaded) {
const scopesLength = scopesLoaded ? 1 : 0
nockBack('goodRequestLocalhost.json', function(done) {
t.equal(this.scopes.length, scopesLength)
const server = http.createServer((request, response) => {
t.pass('server received a request')
response.writeHead(200)
response.end()
})
server.listen(() => {
const request = http.request(
{
host: 'localhost',
path: '/',
port: server.address().port,
},
response => {
t.is(200, response.statusCode)
this.assertScopesFinished()
done()
server.close(t.end)
}
)
request.on('error', t.error)
request.end()
})
})
}

Copy link
Copy Markdown
Member

@gr2m gr2m left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good, but please hold off merging just yet, I want us to celebrate this :) Not sure how yet but will think of something. Great work 👏👏👏

@paulmelnikow
Copy link
Copy Markdown
Member Author

Any clarity on what to do with the bits in test_back.js?

@gr2m
Copy link
Copy Markdown
Member

gr2m commented Jan 6, 2019

Any clarity on what to do with the bits in test_back.js?

Honestly, no idea! It’s been 10 months since I added this comment, I’d have to understand it myself. I gotta focus on other work until Wednesday unfortunately.

@paulmelnikow
Copy link
Copy Markdown
Member Author

Okay. If it's time to merge this and we can't figure it out we can edit the comment.

@lihail
Copy link
Copy Markdown

lihail commented Jan 7, 2019

If I got this right, you should remove this function (and goodRequestLocalhost.json, but for some reason I can't find it..), and replace every occurrence of this function with a call to nockBackWithFixture instead

@paulmelnikow
Copy link
Copy Markdown
Member Author

It'd be great to get this merged before Friday! Shall I leave the test code intact and edit the comment so it no longer mentions AIRPLANE?

nock/tests/test_back.js

Lines 59 to 94 in 26954a7

// this is a temporary as we get rid of all the {skip: process.env.AIRPLANE}
// settings. When we are done with all, replace nockBackWithFixture and get
// rid of this function and the goodRequestLocalhost.json fixtures
function nockBackWithFixtureLocalhost(t, scopesLoaded) {
const scopesLength = scopesLoaded ? 1 : 0
nockBack('goodRequestLocalhost.json', function(done) {
t.equal(this.scopes.length, scopesLength)
const server = http.createServer((request, response) => {
t.pass('server received a request')
response.writeHead(200)
response.end()
})
server.listen(() => {
const request = http.request(
{
host: 'localhost',
path: '/',
port: server.address().port,
},
response => {
t.is(200, response.statusCode)
this.assertScopesFinished()
done()
server.close(t.end)
}
)
request.on('error', t.error)
request.end()
})
})
}

@gr2m
Copy link
Copy Markdown
Member

gr2m commented Jan 14, 2019

We can merge now, @RichardLitt will post the announcement for the Hackathon today.

Yeah, let's remove all code and comments that still reference "process.env.AIRPLANE" 🎉

@gr2m gr2m merged commit 3fa7280 into beta Jan 16, 2019
@gr2m gr2m deleted the bye-airplane branch January 16, 2019 15:51
@RichardLitt
Copy link
Copy Markdown
Member

Announced! See #1268. :)

@nockbot
Copy link
Copy Markdown
Collaborator

nockbot commented Jan 19, 2019

🎉 This PR is included in version 11.0.0-beta.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

@nockbot
Copy link
Copy Markdown
Collaborator

nockbot commented Aug 13, 2019

🎉 This PR is included in version 11.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants