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

Use a Mixin Under Object Oriented Programming FCC Beta #15591

Closed
MikeIke24 opened this issue Jul 3, 2017 · 5 comments
Closed

Use a Mixin Under Object Oriented Programming FCC Beta #15591

MikeIke24 opened this issue Jul 3, 2017 · 5 comments
Labels
help wanted Open for all. You do not need permission to work on these.

Comments

@MikeIke24
Copy link

Challenge use-a-mixin-to-add-common-behavior-between-unrelated-objects has an issue.
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36.
Please describe how to reproduce this issue, and include links to screenshots if possible.

The condition to solve the challenge requires the mixin to be named "Mixing", but it was said that the name should be "Mixin". Just a typo in the assert probably.

let bird = {
name: "Donald",
numLegs: 2
};

let boat = {
name: "Warrior",
type: "race-boat"
};

// Add your code below this line
let glideMixing = function(obj){
obj.glide = function(){
return"I'm soaring!";
};
};

glideMixing(bird);
glideMixing(boat);


@dhcodes
Copy link
Contributor

dhcodes commented Jul 3, 2017

It works with glideMixin as well. The issue here is that the first test is not working correctly. It needs to be updated to check that a glideMixin function is defined. As it is, it passes without defining the function.

@dhcodes dhcodes added beta help wanted Open for all. You do not need permission to work on these. labels Jul 3, 2017
@MikeIke24
Copy link
Author

I see that now, thanks for the correction 👍

@Manish-Giri
Copy link
Contributor

I'll take a look at this.

vs1682 added a commit to vs1682/freeCodeCamp that referenced this issue Jul 23, 2017
Changed a test case where it checks that the user defined function name
matches to that given in instructions.

BREAKING CHANGE: no breaking change

Closes freeCodeCamp#15591
@ltegman
Copy link
Member

ltegman commented Sep 23, 2017

This comment was left in the Contributor chat room, but not in this issue: the problem is not with the test (the first test does check that a function named glideMixin exists) but that if you declared a glideMixin in a previous test run and then change the name to something different that should not pass the tests will still pass. It appears variables from old test runs are being leftover and influencing current test runs.

@Khez
Copy link

Khez commented Sep 28, 2017

@QuincyLarson this issue appears to be fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Open for all. You do not need permission to work on these.
Projects
None yet
Development

No branches or pull requests

6 participants