Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "mocha"
-
Just saw a recruitment post for a female speaker to join a female panel at a "women in tech" event. And it's by an organisation called "codelikeagirl". 😒
As a female developer, it gives me the upmost cringe to hear about any #women or #girlpower events. Do you really need to validate your ability and support because of your gender? Men don't go to #menInTech events, so why do you need to go #womenInTech events?
On the surface it seems all friendly and gender equality fluff. But if you segregate yourselves into an all exclusive group, isn't that the opposite of what your trying to "achieve"?291 -
A big FUCK YOU to everyone who called me a nerd in high school.
Who's earning more now? Ha!
Jokes on you!
But seriously, I didn't realise intelligence is highly appreciated until I started working as a developer. 🤑5 -
We moved to a new office floor and got a brand new set up. My new extension monitor died just after 4 hours of use, it was showing a black screen a with couple of colourful lines running down the screen.
Got the IT guy to come and replace it. He says he must test it with a display cable even though the screen was dead without any input source. (Ok fine cbf arguing with you, just do it.)
*Magicarp used splash, nothing happened*
Realising I was right, he gave the ok for another guy to replace my monitor.
Second guy comes to my desk and realised he forgot the electric screwdriver. (Sigh, how long must I wait...) After he finally finished installing the new monitor he plugged the display cable into a random display port without looking.
*Magicarp used splash, nothing happened*
Since the monitor wasn't displaying anything, he jumped into asking me to restart my computer. I gave him "the wtf are you stupid face" and just said "NO". I looked over to where he plugged the cable and asked why he plugged into the "dp out" port.
I plugged the cable to the correct port and monitor was working.
Felt like I can do their job better without any experience in IT support.
PS. Don't play the "please restart your computer" card on me. I also work in technology.2 -
Junior dev: asks me an easy question cuz he's too lazy to figure it out
Me: listening, thinking he's gonna waste my time again 😓
Senior dev: eavesdrops and helps him out
Me: saved me, woohoo 😎
*Few minutes later*
Senior dev: "by the time you finished asking this question, you could have compiled the code yourself to see what happens"
Me: 😂😂😂😂😂🤣🤣😂😂😂4 -
Tester: I'm going to start testing your Android code. How do I set up it?
Me: just bring me an Android test device and I'll show you
Tester: *comes back holding a big golden phone*
Me: *huh? Haven't seen that Android device before... I wonder which manufacturer made it*
Tester: *puts down golden phone on my desk* here you go!
Me: 😱😱😱😱
...
HUH? This is an iPhone!!!!
😩😱😧😖😰😫😵😱😱4 -
College/university: gets a FAIL for plagiarising stack overflow. Serious offence
Working full time: gets PAID to plagiarise stack overflow. Everyday routine.11 -
FUCKING FUCK JAVASCRIPT AND IT'S FUCKING 10000 DEVDEPENDENCIES.
LET ME FUCKING CODE AND WRITE TESTS AND NOT SPEND FUCKING ONE FUCKITY FUCK WEEK TRYING TO FIGURE OUT HOW TO FUCKING MAKE MOCHA AND KARMA PLAY WITH FUCKING ES6 CODE YOU FUCKING FUCKTARD PIECE OF SHIT TECH.
I NO LONGER FUCKING KNOW WHICH PACKAGES I FUCKING NEED AND WHICH I FUCKING DON'T FUCKING DUMBFUCK FUCKWIT OPEN AND HACKABLE MY BROWN ASS PIECE OF TECHNOLOGY STACK.8 -
My first performance review as a graduate:
Boss: "we can't give you the rating you deserve because HR"
Me: "ok whatever, what can I do to get the rating I'm suppose to get?"
B: *lists job description of a senior developer* ... "Interview candidates, mentor juniors, start a project and make me profit"
Me: (if I can do that as a graduate, what am I doing here?)
My last performance review at the same company:
B: "we can't give you the rating you deserve because HR"
M: "ok what can I do to improve?"
B: *lists everything I did before the first performance review that wasn't expected of me*
M: (LoL funny, I just wanted to hear your response because I know you'd forget about the first review. Another reason to validate my resignation) -
After 10 years of development, and 7 years of being happily married, I'm in love again... With Unit Testing.
-
WebDev jobs should come with big warning signs:
"You absolutely will lose your sanity!"
"IE11 might indirectly lead to impotence!"
"You won't get laid more often by using CSS Grid!"
"You will have to fix websites which only appear broken on iOS Safari!"
"Get some extra terabytes ready for your node modules!"
"Get ready to yarnify your npm dockerized webassembly blobs while gulping on your mocha chai latte with no karma!"
Can't we just go back to the good old times with Quick Basic and chill?
Man, the ladies were flocking around those programmer boyz, I tell ya... Klickety klackety on the mechanical6 -
A programmer walks into a café and orders a double mocha. The barista replies, "sorry, sir we have floats only". :3
-
It's actually right now. I'm looking forward to my interview at another company today.
So sick of getting angrier everyday.1 -
Just thought I'd share what I've been working on lately.
Heap: https://repl.it/@AmyShackles/Heap/...
Array: https://repl.it/@AmyShackles/...
Binary Tree: https://repl.it/@AmyShackles/...
(I'm so freaking tired.)6 -
MOCHA YOU FUCKING BITCH, THERE IS A DONE() CALLBACK BEING CALLED IN THIS TEST, WHAT IS YOUR PROBLEM??? I WILL RAPE YOUR FUCKING SOURCE CODE. But really mocha test, why u no work so we can both move on with our lives 😣😦😞7
-
On our Android tablet app, we had to have the hamburger menu on the bottom right corner (normal top left). It sorta became the floating action button...3
-
This happened at the beginning of my first job:
Me: I want to clarify some things that wasn't specified in my task. I want to see if I need to do them and how I should solve it.
Senior dev: Don't worry about it. If testers pass the task back to you, then you do it. Just do as it is.
Me: 😓2 -
After writing ~200 lines of code and then unit testing it
THE TESTS ALL PASS!!!
then I run them again just to be sure and they all pass but mocha is saying I am getting 40ms lag on some of my tests...
Noooo!!!
This is meant to be an async message passing system; I cannot have an input lag of 40ms :(5 -
Worst mistake I have made is accidentally wiping a database table by messing up a SQL script. This was caught after it had been deployed to around 30 customer sites, most of which had no technical staff on site, and we didn't have remote access to. I bought our support team cookies for fixing that one.1
-
The company where i am working at currently is kinda weird. The company is run by a gujrati guy and he has placed almost all his cousins in high positions...and on top of that the CTO (whos the bro of the owner) micromanages people and also fires them on a whim...i am kinda worried that if i am not able to do a particular task, i would be fired too...He has asked me to do unit testing of some complicated functions on mocha/chai and i have never done all this before. I am not understanding what to do and there are no senior devs in the office who knows about these things...7
-
when you just had to drink that Kate coffee to get that last bit done and commited but as a result is completely unable to sleep.. ends up in a train of thoughs with a hint of philosophy... weep woop before you know it, your night sent Warp speed to bright outside..
finally i feel tired.. fml.1 -
First time used the TDD approach. I knew I needed to use it but never quite used it cause I thought it would slow me down. I was so wrong!
Mocha and chai js rock 🤘5 -
I save all my work relate passwords in a single text file on my computer. I always have it open too.
Too many systems, too many password requirements, expires too frequently.1 -
It's amazing that we had to explain to an offshore API dev how timezones work. You'd think they know what it is by being in a different timezone, think again.3
-
Is it just me or is it just really hard to set up and test frontend JavaScript? 🤔
Karma + Mocha + Chai + whatever
is a pain
And it doesn't look very pretty..3 -
Going back to a php project after writing loads of typescript on a node stack, I suddenly miss the instantanious feedback loop on file save via `nodemon` for basic scripts and `mocha --watch --reporter min` for tests.
Using phpunit, I currently have to rerun the test manually whenever I feel like. Which now feels so annoying. Cause I didn't know besser.
Now I was searching for something similar in php and I find answers[1] pointing me to use either set up some npm hooks or set up gulp task or to use pywatch. phpstorm also is supposed to support file watchers and run test on every save, yet setting them up feels clunky.
[1] http://stackoverflow.com/questions/...1 -
Legacy code was so bad that it created the existence of my team to do a refactor and rewrite.
(Outsource to in house) -
JS/NODE/MOCHA I HATE U....
SPENT ALL MORNING REVERTING AND DEBUGGING A BRANCH BC SOME UNIT TESTS FAILED.
THE CAUSE WAS NOT IN THE FAILED CASE THO.... IT WAS BECAUSE SOME OTHER JS FILE WAS NAMED *Test.js
ITS NOT A PROBLEM IN A LIVE SERVER BUT IT SCREWS UP THE SERVER WHEN ITS RUN IN MOCHA FOR ITS UNIT TESTING... -
Android Interview question: "what would you use to display a large set of similar data?"
1) a linearlayout
2) a spinner
3) a recyclerview
4) a listview
The "senior" applicant picked 1)
He was not even considered.10 -
How do you manage switching between different languages and the tools and frameworks that are used for each?
Or frontend server and APIs are in JS and use mocha for testing.
But backend is in Java which uses Mockito.
Every time I need writes tests and well anything that is language specifics, I basically have to relearn rather than just getting it done.2 -
!rant
Finally came to the point, using mocha, jshint together with Travis CI for some of our coding projects and I freaking love it 👍🏻
rant
But now I have to teach my colleagues, because some of them didn't use it before either (We are mostly a team of students, if you come to the point 'How can you not know about travis and mocha')1 -
Wasted 15 minutes by:
Put the `done` in the `describe()` callback instead if the `it()` callback in a mocha test.1 -
I was a bit intimidated going into my first full time job since I was the youngest on the team. They put me on a small project to start with and it wasn't difficult at all.
After working with my colleague for a while, he came in one morning and asked what I'm doing here.
"I'm at work? I work here?", I replied in confusion.
Then he went on about that I shouldn't be working at this company. He thought I was smart enough to work overseas at an investment bank.
Thanks for the complement :) -
Anyone know how to go about unit testing an application that is made up of:
- Electron
- Node
- React
- Typescript
(React using Typescript of course).
Electron has its own framework (Spectron), people seem to use Mocha with Node, React has its own tools like React testing library (and testing UI components will probably end me) and Typescript seems to play best with Jest - but a special Typescript flavour of Jest called ts-jest is preferable because the only other option is having Babel and its Typescript support that doesn't type check.
I want to beg for the sweet release of death.4 -
Why are there so many testing framworks for JavaScript? Jasmine, mocha, buster ... and for spies, stubs and mocks, there is sinon and for assertions, there is chai. And oh you can record entire external api calls with nock and whatever else I forgot. I am a bit overwhelmed by this overambundancy of libraries. Writing tests is supposed to be easy.2
-
My fellow developer was given a responsibility of writing unit test cases.
And instead of mocking the db calls he ended up making actual calls to db and adding realtime data to firestore everytime a test runs. Also he used mocha for the same. When i told him that we need to mock the db calls he said he will use sinon.js for the same and for code coverage his plans were to use istanbul.
I was like FUCKKKKKKK. , why the fk you aren't using jest. I mean whyyyyyyyy. WHAT THE FK4 -
Commented on a hacky pull request that the junior dev called the same method twice for no reason.
Junior dev didn't get it and asked me to explain in person.
I went over and traced the code, finally he understood my comment. Then he said "Yes, I call it twice"in a tone that as if there's nothing wrong in that statement.
🤦♂️2 -
Pull request of the week: (In simplified version)
a = getVariable()
...
getVariable() {
[Some logic]
a = thisValue
.. or ..
a = thatValue
return a
}
🤦♂️🤦♂️
Tried my best to write a polite comment -
3 days from planned go live date and the client turns around and says "We need these features added before we can go live". New features pretty much double the existing workflow, and require extensive rework. Client is insisting on meeting the original date, despite the product being "not usable" until the changes are made.
-
I'm using typescript and run mocha acceptance tests. I was confused as to why my tests were failing on the Jenkins albeit they passed locally just fine.
I couldn't find the error. Just after making a pause, implementing something else, I realized what the problem was:
As I renamed a folder from `fixtures` to `tapes` my test run on the Jenkins suddenly claimed to not find the files in `fixtures`. Yet in my code base there was no occurrence of the string `fixtures` anymore and then it hit me like a brick wall:
I have old transpiled files in my outDir, the `dist` folder on the jenkins! Locally, I make sure to run `git clean -fd` once in a while, so I never was hit by it it locally. Yet my jenkins had really old files in the `dist` folder. And just running `rm dist/* && tsc` fixed the entire ordeal.
Well, JavaScript is so 2012 and typescript is the new shit, yet transpiling the code can leave to some quite strong headaches.1 -
Fucking shit Mongoose. I have written it again but they managed to gather every antipattern in their lib.
On the topic testing they write that you shouldnt use Jest but use Mocha for testing. Yeah sure, I determine my testrunner for a fucking data model thats at its best unnecessary because the native driver can do everything mongoose can but better.
I would ditch this shit the second I could if it was for me. Unreliable junk!3 -
I think maybe I am doing something wrong.
I have this node.js application I am building with typescript and I wrote tests in mocha. Now I need to make some changes which break quite a few tests.
When I run mocha on the command line the errors whizz past. When I worked in java and .net (with junit and nunit) you could just click a test in the ide to run it. So you could 'fix' one test at a time. Also you could just double click on a fail and it would jump you to the code for that test or the exception that failed.
I found this extension for visual studio code that adds a sidebar to visual studio code. It looked good but now I spent the last hour trying to get it to run typescript tests - looks like it doesn't support the compilers argument.
Surely other developers must do this sort of stuff. I am not using an obscure technology stack right? Do you write automated tests for your codebase? What tools do you use? Should I switch ide? switch testing frameworks? -
Released the product to customers without realising someone had pre-filled a production test accounted login at the login screen. Obviously it was used for testing purposes and the dev forgot to remove it before committing.
I loled when I found out about it, and some customers started to login and made transactions.
When I checked the commit history... It was under my name :/2 -
What's a good way to learn proper testing? I'll be starting in a position before long that uses JUnit, karma, mocha, etc.1
-
```
Error: Resolution method is overspecified. Specify a callback *or* return a Promise; not both.
```
(ノ≧∇≦)ノ ミ ┸┸)`ν゚)・;’. -
When 10 months old article about possible problems and how to avoid with mocha, chai and es8 is outdated as hell...
But the problem is that only in the comments did they write that it is outdated!7 -
What do you Guys recommend for automate self testing functions on a node Server? Grunt, Mocha or Chai and why?
-
Mocha or Tape (both with supertest)? For Backend testing. Api, graphql, that shit.
What would you prefer and why?4