Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Johnny Austen](https://uploads.teamtreehouse.com/production/profile-photos/11535570/micro_jman.jpg)
Johnny Austen
Front End Web Development Techdegree Graduate 35,494 PointsFinding it very difficult to engage with this course...
Has anyone else struggled with this section of the course? Might be the long videos or perhaps just my application, but I don't feel I'm really picking this up. At the same time, it doesn't really seem crazy complicated either. Has anyone else struggled with this section?
2 Answers
![Joseph Lander](https://secure.gravatar.com/avatar/42b0932bc31e9459a466ae2857c0a04d?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Joseph Lander
Full Stack JavaScript Techdegree Graduate 27,765 PointsI am struggling too currently.
In fairness, while I understand the concept of testing and the language of the methods seem straight forward (e.g. expect() and to.be.true) this is my first ever practice. Rather than being able to focus on just the syntax, it's a different approach to developing and I'm trying to understand the logic of building a battleship game too! For me, at this stage, it feels like too many unknowns.
I knew how to write up the 'describe' section and link it to the fire function in ship_methods.js but it was the logic of the task that I didn't know what I needed to do. Here were my thoughts:
- it('should show both functions fired') - first guess
- it('should show checkforShip fired') then damageShip - as should be independent
Then wondered how this worked at all as the words 'unit' and 'independent' stuck in my mind from the lessons. You don't want overlap for a 'unit test' but this is an overlap?!
As Guil begins the answer it feels that you give an example and see it run all the way through. Currently, in my mind, that sounds like 'integration testing' that was said to be explicitly different.
I will chalk this up as a good first run through that I can refer back to later. Personally, I have used a few projects now that used npm scripts and was pleased to be more comfortable with that.
![Timo Koskinen](https://uploads.teamtreehouse.com/production/profile-photos/11571257/micro_Koskinen.jpg)
Timo Koskinen
Full Stack JavaScript Techdegree Graduate 24,972 PointsI found this all very difficult at first. But then I took a pause for 2 hours during this clip and just wrote my own functions and tested all kind of super easy things. I just wanted it all to be simple and see what is in the provided Chai BDD API Documentation. Very time consuming for sure. Then I went back to this task and it all clicked in my head.
Joseph Lander
Full Stack JavaScript Techdegree Graduate 27,765 PointsJoseph Lander
Full Stack JavaScript Techdegree Graduate 27,765 PointsYes, almost finished watching the answer video but because I don't fully grasp what the logic is doing, I have a very thin understanding of what the expectations are that are being set.