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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃挴 #8

Merged
merged 4 commits into from
Nov 14, 2017
Merged

馃挴 #8

merged 4 commits into from
Nov 14, 2017

Conversation

digitalBush
Copy link
Owner

This brings coverage to 100%

@coveralls
Copy link

Coverage Status

Coverage increased (+6.09%) to 100.0% when pulling df3f3e9 on feature-fully-covered into f239e52 on master.

@calvinb
Copy link
Contributor

calvinb commented Nov 10, 2017

@digitalBush When I npm install, a get a new string_decoder property in my package-lock.json. Should that be committed?

readFile: sinon.stub()
};
fs.readFile.onCall( 0 ).callsArgWith( 2, null, expected );
fs.readFile.onCall( 1 ).throws( new Error( "you failed" ) );
Copy link
Contributor

Choose a reason for hiding this comment

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

Rather than setting different behaviors for different calls, would it be simpler just to assert that fs.readFile is called only once?

@@ -17,7 +17,7 @@ module.exports = function( relativeFile ) {

let result = cache[ fileName ];
if ( !result ) {
result = cache[ fileName ] = readFileAsync( fileName, "utf8" );
result = cache[ fileName ] = await readFileAsync( fileName, "utf8" );
Copy link
Contributor

Choose a reason for hiding this comment

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

I know this is not part of this PR, but this cache looks like a great place for a Map.

@digitalBush
Copy link
Owner Author

@calvinb Made the changes you suggested. npm install was fine for me though. Are you running the latest version of node?

@coveralls
Copy link

Coverage Status

Coverage increased (+6.09%) to 100.0% when pulling 8a33f57 on feature-fully-covered into f239e52 on master.

@calvinb
Copy link
Contributor

calvinb commented Nov 14, 2017

@calvinb calvinb merged commit 3718298 into master Nov 14, 2017
@calvinb calvinb deleted the feature-fully-covered branch November 14, 2017 19:42
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.

None yet

3 participants