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
i have service resolvePromise method which returns promise. resolvePromise() { return this.$http.get('report-folder.json'); } from my controller i call resolvePromise method of service leftNavService.resolvePromise().then((response) => { this.itemList= _.map(response.data, 'folderName'); }).catch(function (e) { throw e; }); I am using mocha-chai and sinon to write unit test cases. Below ...

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

Report Cancel
0
0 Answer 1 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 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

Report
Question
Below is the code that I wrote with mocha, chai and supertest. I have a question with regards to the segment of code below that works, with focus on token. describe('Authenticated userTest', function () { var token; ...

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

Report Cancel
solved 0
1 Answer 5 views

Report
Question
when I try to executing my react-tests with mocha, I got the following error: /Users/niklaskiefer/Github/adal-fronted/test/CasesSpec.js:49 (0, _chai.describe)('Cases', function () { ^ TypeError: (0 , _chai.describe) ...

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

Report Cancel
solved 0
1 Answer 2 views

Report
Question
ive the following code which run test against promises and it doesnt mettar what the event args are sending the test is successful ,how to avoid that? I think since this is async the test done() called before the event ...

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

Report Cancel
0
0 Answer 2 views