I have a simple calculator function that I wrote for a coding challenge. Now I'm having trouble with an additional calculate function that should retu ...
I have a simple calculator function that I wrote for a coding challenge. Now I'm having trouble with an additional calculate function that should retu ...
I'm trying to write a dynamic test that looks like this: The first test runs completely OK and a array is accessible inside the test, but when I tr ...
I am currently developing an VSCode extension. I've already made some tests in mocha and chai. I'm trying to execute them directly with the recommend ...
i'am new in the JS world and mocha framework. I would like to write a unite test in order to cover this middleware module. Here is the code of my mid ...
I have a Node.js Mocha test suite (I've created a minimal reproduction based on the real world application I was trying to create an automated test fo ...
i was trying to test this the file name is test and changed the direction to the file in the terminal and wrote and the terminal said "describe ...
Why when I run mocha tests in parallel via azure pipeline they always get executed one by one? I have tried both with and without docker in the pipel ...
Trying to write a simple test following this guide https://medium.com/swlh/how-to-setting-up-unit-tests-with-typescript-871c0f4f1609 but I get TS6196: ...
I have a function, which has another function in it. And in the second function we are making an API call. So how can I write a unit test for this sce ...
**Edit: Re-written with a simple example that works first: So I've got a test file and 2 modules. moduleA has a dependency, moduleB My test file ...
After going through all related issues regarding stubbing readFile/Sync with Sinon /Chai/ Mocha, the test is failing. There's a basic getFile functio ...
I'm using Chai, Mocha for testing in my project. I want to test the createTreefromFolder function from a module tree.js: export function createTreefr ...
How to mock 'Request' in Mocha using express with Typescript? Current solution is following: I have got an error Conversion of type '{ get: () => ...
So I have package 1 that I wrote in Typescript that contains mocha tests and I'm pretty sure that it works as it should. I push all the code to the gi ...
I'm building node express app and recently I wanted to write some tests with mocha. I'm willing to use chai-htpp plugin to run my app during tests. Th ...
I have two different drop-down in one webpage the difference between both is that for the first drop-down the first option is selected by default and ...
so npm audit just found jsonwebtoken to have a security vulnerbility. The solution is to update to version 9.0.0 - which I did. However, my mocha tes ...
I try to add test for my code use three according to Testing-with-NPM Use mocha. it works great with following code but when i uncomment following ...
I have a scenario, where i need to put Assertion on an element's text which could be true OR pass the test case, if the any 1 value is present out of ...
When writing nodejs unit test case I want to mock variables. let abc = awsMock.service.lambda; In above code, awsMock I am creating and passing to m ...