Skip to content

Handle immutable configuration#33

Merged
flovilmart merged 2 commits intoparse-community:masterfrom
acinader:expect-immutable-config
Dec 6, 2016
Merged

Handle immutable configuration#33
flovilmart merged 2 commits intoparse-community:masterfrom
acinader:expect-immutable-config

Conversation

@acinader
Copy link
Copy Markdown
Contributor

@acinader acinader commented Dec 6, 2016

The popular and awesome https://github.com/lorenwest/node-config
makes all configs values immutable. Good practice!

parse-server-s3-adapter attempts to edit config values.

This fix will respect immutability allowing this adapter
to work with node-config.

The popular and awesome https://github.com/lorenwest/node-config
makes all configs values immutable.  Good practice!

parse-server-s3-adapter attempts to edit config values.

This fix will respect immutability allowing this adapter
to work with node-config.
@codecov-io
Copy link
Copy Markdown

codecov-io commented Dec 6, 2016

Current coverage is 69.53% (diff: 100%)

Merging #33 into master will decrease coverage by 25.74%

@@             master        #33   diff @@
==========================================
  Files             2          2          
  Lines           127        128     +1   
  Methods           9          9          
  Messages          0          0          
  Branches         25         25          
==========================================
- Hits            121         89    -32   
- Misses            6         39    +33   
  Partials          0          0          

Powered by Codecov. Last update d55b080...1993787

Comment thread spec/helpers/testHelpers.js Outdated
@@ -0,0 +1 @@
process.env.NODE_ENV = 'test';
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't like those env overrides in code, can we put it in the test command?

Comment thread spec/test.spec.js Outdated
describe('S3Adapter tests', () => {
beforeEach(() => {
delete process.env.S3_BUCKET;
delete process.env.S3_REGION
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Add trailing ;

1. move setting NODE_ENV to test command instead of helpers.
2. add a missing ;.  lint coming.....
@flovilmart flovilmart merged commit fa27701 into parse-community:master Dec 6, 2016
@acinader acinader deleted the expect-immutable-config branch December 6, 2016 23:08
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