Report
Question
I’m trying to add tdd to my website. However, I’m having an issue getting mocha/chai to run. process.env.NODE_ENV = 'test'; //var mongoose = require("mongoose"); var chai = require('chai'); var chaiHttp = require('chai-http'); var server = require('../app'); var m_Kbase_data = require('../model/Kbase'); var m_KbaseScript_schema = require('../model/KbaseScript'); var should = ...

Please briefly explain why you feel this question should be reported .

Report Cancel
solved 0
1 Answer 10 views

Report
Question
Response status passes and fails under my control. But I can’t see to get the expect(res.body) test to pass. Route displays exactly as programmed when viewed in the browser. but mocha/chai test for testing what is rendered ...

Please briefly explain why you feel this question should be reported .

Report Cancel
solved 0
1 Answer 14 views

Report
Question
Objective Run Mocha tests with npm run, without getting a ELIFECYCLE error. Background After my last question on mocha and npm, I found that Mocha returns the number of failed tests as a result. Now, when running a script with npm ...

Please briefly explain why you feel this question should be reported .

Report Cancel
solved 0
2 Answer 2 views

Report
Question
I’m creating an auth middleware app using LDAP and I’m having difficulty getting a search to work. I’m using Mocha for tests and I created a util.js to create a mock ldapjs server: let server = require('../mocks/ldapServer'); const ldap = require('ldapjs'); ...

Please briefly explain why you feel this question should be reported .

Report Cancel
solved 0
2 Answer 9 views

Report
Question
i want to test my file number.d.ts like verifying if this file contains in its class such functions by testing the generated file .js. Here is file number.d.ts : // file number.d.ts export interface Options{ ...

Please briefly explain why you feel this question should be reported .

Report Cancel
0
0 Answer 2 views

Report
Question
// global var ws = null; var msgCount = 0; var onMessageHandler = null; // test #1 - this test passes successfully describe('connect to wsserver test', function() { it('should successfully connect to wsserver', function(done) { ...

Please briefly explain why you feel this question should be reported .

Report Cancel
solved 0
2 Answer 1 views

Report
Question
I’m writing a mocha test for some task and I want to check value B 3 minutes after function A returns. So, I’m looking for something that helps me change the time because I don’t actually want to wait 3 ...

Please briefly explain why you feel this question should be reported .

Report Cancel
solved 0
1 Answer 3 views

Report
Question
I want to create unit tests for my typescript class using mocha and chai. Here’s my code: // file MyClass.ts export class MyClass { static add (value1: number, value2: number): number; } // file MyClass.spec.ts import myClass ...

Please briefly explain why you feel this question should be reported .

Report Cancel
0
0 Answer 1 views

Report
Question
I have a route on my Node.js HTTP server, and I am trying to write a Mocha test for it. Through a URL, I send a requested file back to the client via an fs.createReadStream. There’s this question which seems ...

Please briefly explain why you feel this question should be reported .

Report Cancel
0
0 Answer 2 views