Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test coverage for lib/run_action.js #187

Merged
merged 4 commits into from
Jun 18, 2020

Conversation

rmeritz
Copy link
Contributor

@rmeritz rmeritz commented Jun 12, 2020

run_action didn't have any unit tests but was already pretty throughly tested because almost all methods use it run make their API requests. I didn't add unit testing I just added the missing pieaces of coverage:

  • Dealing with retries
  • Dealing with the user header if requests are from the browser

@@ -16,6 +16,7 @@ describe('record retrival', function() {
});

afterAll(function() {
delete global.x;
Copy link
Contributor

Choose a reason for hiding this comment

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

This should probably delete global.window

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Opps thanks fixed.

});
});

it('can find after a retry if rate limited', function(done) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice!

@rmeritz
Copy link
Contributor Author

rmeritz commented Jun 17, 2020

@kasrak - Once this PR gets merged I'm ready to open up a stacked PR for changing requests with node-fetch: bocoup/airtable.js@run-action-tests-rmeritz...bocoup:node-fetch-rmeritz

@kasrak
Copy link
Contributor

kasrak commented Jun 17, 2020

@rmeritz thanks! Looks like there's a conflict with test/find.test.js

@rmeritz rmeritz force-pushed the run-action-tests-rmeritz branch from b1d49ec to 4be1911 Compare June 17, 2020 20:00
@rmeritz
Copy link
Contributor Author

rmeritz commented Jun 17, 2020

@kasrak - I fixed the merge conflict.

@kasrak kasrak changed the title Run action tests rmeritz Add test coverage for lib/run_action.js Jun 18, 2020
@kasrak kasrak merged commit 66b9e5d into Airtable:master Jun 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants