learn-co-curriculum / react-hooks-props-basics-lab Goto Github PK
View Code? Open in Web Editor NEWLicense: Other
License: Other
https://learning.flatironschool.com/courses/4542/assignments/150030?module_item_id=318021
Running through this lab, I spent a large amount of time trying to figure out why my test were failing despite the output appearing to be correct.
After digging through the tests I figured out that toBeInTheDocument()
seems to only return the text content of the HTML tags and not the values of the various attributes. Upon closer inspection of the image on the lesson I do indeed see that it has the 'Links' URLs written out rather than the words 'GIthub' or 'LinkedIn', but I feel failing the tests on this is not really fair as the requirement only stated the links needed to be present.
If it's agreed that this path is a good one to go down, I'm happy to make the PR myself ๐
No response
I think a useful tweak would be to change the relevant tests to instead test for the href
parameter. I'm definitely no React expert (yet!) but I tweaked the tests to produce what seemed to be what I was after like so:
test("passes 'github' to <Links> as a prop, via <About>", () => {
const {container} = render(<App />);
const a = container.querySelector(`a[href="${user.links.github}"`)
expect(a).toBeInTheDocument();
expect(a.tagName).toEqual("A");
});
https://learning.flatironschool.com/courses/4566/assignments/161368?module_item_id=345773
The test seems to be checking for "username" instead of "name" in the 'About' section of the lab.
The data object has "name" as the key.
The tests check for "username".
No response
Change the tests to look for "name" instead of "username" in the 'About' section.
https://learning.flatironschool.com/courses/5249/assignments/216675
learn test
not registering completion of this lab on Canvas
Students are reporting that, even when tests are passing locally, executing learn test
is not marking the lab as complete on Canvas or pushing their solution to their fork on Github.
No response
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.